Class Codec.Identity
java.lang.Object
io.grpc.Codec.Identity
- All Implemented Interfaces:
Codec, Compressor, Decompressor
- Enclosing interface:
Codec
-
Nested Class Summary
Nested classes/interfaces inherited from interface Codec
Codec.Gzip, Codec.Identity -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncompress(OutputStream os) Wraps an existing output stream with a compressing output stream.Wraps an existing input stream with a decompressing input stream.Returns the message encoding that this compressor uses.
-
Field Details
-
NONE
Special sentinel codec indicating that no compression should be used. Users should use reference equality to see if compression is disabled.
-
-
Constructor Details
-
Identity
private Identity()
-
-
Method Details
-
decompress
Description copied from interface:DecompressorWraps an existing input stream with a decompressing input stream.- Specified by:
decompressin interfaceDecompressor- Parameters:
is- The input stream of uncompressed data- Returns:
- An input stream that decompresses
-
getMessageEncoding
Description copied from interface:CompressorReturns the message encoding that this compressor uses.This can be values such as "gzip", "deflate", "snappy", etc.
- Specified by:
getMessageEncodingin interfaceCompressor- Specified by:
getMessageEncodingin interfaceDecompressor
-
compress
Description copied from interface:CompressorWraps an existing output stream with a compressing output stream.- Specified by:
compressin interfaceCompressor- Parameters:
os- The output stream of uncompressed data- Returns:
- An output stream that compresses
-