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 Type
    Method
    Description
    byte[]
    Converts an Object to bytes.
    convertToObject(byte[] objectBytes)
    Converts bytes to an Object.
  • Method Details

    • convertToObject

      Object convertToObject(byte[] objectBytes)
      Converts bytes to an Object.
      Parameters:
      objectBytes - bytes of the Object
      Returns:
      Object, created from the bytes
    • convertToBytes

      byte[] convertToBytes(Object obj)
      Converts an Object to bytes.
      Parameters:
      obj - Object to be converted
      Returns:
      bytes form of the Object