Package com.nt.udc.util
Interface BytesConverter
public interface BytesConverter
This is a simple interface that allows an Object to
go to and from byte[] form (without the use of an
InputStream or OutputStream.)
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
convertToBytes
(Object obj) Converts an Object to bytes.convertToObject
(byte[] objectBytes) Converts bytes to an Object.
-
Method Details
-
convertToObject
Converts bytes to an Object.- Parameters:
objectBytes
- bytes of the Object- Returns:
- Object, created from the bytes
-
convertToBytes
Converts an Object to bytes.- Parameters:
obj
- Object to be converted- Returns:
- bytes form of the Object
-