Interface ItemEncoder<T>
-
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
AbstractOutputStreamItemEncoder,AvroEncoder,CSVEncoder
public interface ItemEncoder<T> extends Closeable
A functional interface for stateful encoders, encoding object into some binary destination. Each encoder should have a correspondingEncoderFactory, which is the type that pipes work with. Implementations typically receive a non-buffered output stream in their constructor, and do the necessary pre-processing (such as adding a buffered wrapper) there.- Author:
- Eyal Schneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidencode(T item)
-
-
-
Method Detail
-
encode
void encode(T item) throws IOException
- Parameters:
item- The item to encode into the output stream provided at construction type- Throws:
IOException- In case of write error
-
-