public class InputStreamDecoder extends CoderAdapter implements Decoder.Binary<java.io.InputStream>
Decoder
for InputStream
.Decoder.Binary<T>, Decoder.BinaryStream<T>, Decoder.Text<T>, Decoder.TextStream<T>
Constructor and Description |
---|
InputStreamDecoder() |
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
decode(java.nio.ByteBuffer bytes)
Decode the given bytes into an object of type T.
|
boolean |
willDecode(java.nio.ByteBuffer bytes)
Answer whether the given bytes can be decoded into an object of type T.
|
destroy, init
public boolean willDecode(java.nio.ByteBuffer bytes)
Decoder.Binary
willDecode
in interface Decoder.Binary<java.io.InputStream>
bytes
- the bytes to be decoded.public java.io.InputStream decode(java.nio.ByteBuffer bytes) throws DecodeException
Decoder.Binary
decode
in interface Decoder.Binary<java.io.InputStream>
bytes
- the bytes to be decoded.DecodeException
- If the provided bytes cannot be decoded to type TCopyright © 2012–2025 Oracle Corporation. All rights reserved.