Class ByteTranslator

    • Constructor Summary

      Constructors 
      Constructor Description
      ByteTranslator()  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract java.lang.String translate​(byte[] bytes)
      Translate a byte array into a String.
      abstract byte[] translate​(java.lang.String s)
      Translate a string into a byte array.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ByteTranslator

        public ByteTranslator()
    • Method Detail

      • translate

        public abstract byte[] translate​(java.lang.String s)
                                  throws java.io.IOException
        Translate a string into a byte array.
        Parameters:
        s - the string.
        Returns:
        the byte array
        Throws:
        java.io.IOException - wrapping any underlying exception
      • translate

        public abstract java.lang.String translate​(byte[] bytes)
                                            throws java.io.IOException
        Translate a byte array into a String.
        Parameters:
        bytes - the byte array.
        Returns:
        the string
        Throws:
        java.io.IOException - wrapping any underlying exception