Package ca.odell.glazedlists.io
Interface ByteCoder
-
public interface ByteCoderAn utility interface for converting Objects to bytes for storage or network transport. For some common, general-purposeByteCoders, see theGlazedListsfactory class.- Author:
- Jesse Wilson
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Objectdecode(java.io.InputStream source)Decode the Object from the specifiedInputStream.voidencode(java.lang.Object source, java.io.OutputStream target)Encode the specified Object over the specifiedOutputStream.
-
-
-
Method Detail
-
encode
void encode(java.lang.Object source, java.io.OutputStream target) throws java.io.IOExceptionEncode the specified Object over the specifiedOutputStream.- Throws:
java.io.IOException
-
decode
java.lang.Object decode(java.io.InputStream source) throws java.io.IOExceptionDecode the Object from the specifiedInputStream. The stream should contain exactly one Object and no further bytes before the end of the stream.- Throws:
java.io.IOException
-
-