Class StringPortability

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private StringPortability()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void bootstrap​(java.io.ObjectInput input)  
      void close()  
      java.lang.String decode​(java.nio.ByteBuffer buffer)
      Decodes a ByteBuffer to an object of type T.
      java.nio.ByteBuffer encode​(java.lang.String object)
      Encodes an object of type T as a ByteBuffer.
      boolean equals​(java.lang.Object value, java.nio.ByteBuffer readBuffer)
      Returns true if the encoded object once decoded would be Object.equals(Object) to the supplied object.
      void flush()  
      void persist​(java.io.ObjectOutput output)  
      • Methods inherited from class java.lang.Object

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

      • StringPortability

        private StringPortability()
    • Method Detail

      • encode

        public java.nio.ByteBuffer encode​(java.lang.String object)
        Description copied from interface: Portability
        Encodes an object of type T as a ByteBuffer.
        Specified by:
        encode in interface Portability<java.lang.String>
        Parameters:
        object - object to be encoded
        Returns:
        the encoded object
      • decode

        public java.lang.String decode​(java.nio.ByteBuffer buffer)
        Description copied from interface: Portability
        Decodes a ByteBuffer to an object of type T.
        Specified by:
        decode in interface Portability<java.lang.String>
        Parameters:
        buffer - bytes to decode
        Returns:
        the decoded object
      • equals

        public boolean equals​(java.lang.Object value,
                              java.nio.ByteBuffer readBuffer)
        Description copied from interface: Portability
        Returns true if the encoded object once decoded would be Object.equals(Object) to the supplied object.
        Specified by:
        equals in interface Portability<java.lang.String>
        Parameters:
        value - object to compare to
        readBuffer - buffer containing encoded object
        Returns:
        true if the two parameters are "equal"
      • flush

        public void flush()
                   throws java.io.IOException
        Specified by:
        flush in interface Persistent
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface Persistent
        Throws:
        java.io.IOException
      • persist

        public void persist​(java.io.ObjectOutput output)
                     throws java.io.IOException
        Specified by:
        persist in interface Persistent
        Throws:
        java.io.IOException
      • bootstrap

        public void bootstrap​(java.io.ObjectInput input)
                       throws java.io.IOException
        Specified by:
        bootstrap in interface Persistent
        Throws:
        java.io.IOException