Class SerializableParameter

  • All Implemented Interfaces:
    java.lang.Cloneable, ParameterHolder

    public class SerializableParameter
    extends java.lang.Object
    implements java.lang.Cloneable, ParameterHolder
    • Field Detail

      • noBackSlashEscapes

        private final boolean noBackSlashEscapes
      • object

        private java.lang.Object object
      • loadedStream

        private byte[] loadedStream
    • Constructor Detail

      • SerializableParameter

        public SerializableParameter​(java.lang.Object object,
                                     boolean noBackslashEscapes)
    • Method Detail

      • writeTo

        public void writeTo​(PacketOutputStream pos)
                     throws java.io.IOException
        Write object to buffer for text protocol.
        Specified by:
        writeTo in interface ParameterHolder
        Parameters:
        pos - the stream to write to
        Throws:
        java.io.IOException - if error reading stream
      • writeObjectToBytes

        private void writeObjectToBytes()
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • getApproximateTextProtocolLength

        public long getApproximateTextProtocolLength()
                                              throws java.io.IOException
        Return approximated data calculated length.
        Specified by:
        getApproximateTextProtocolLength in interface ParameterHolder
        Returns:
        approximated data length.
        Throws:
        java.io.IOException - if error reading stream
      • writeBinary

        public void writeBinary​(PacketOutputStream pos)
                         throws java.io.IOException
        Write data to socket in binary format.
        Specified by:
        writeBinary in interface ParameterHolder
        Parameters:
        pos - socket output stream
        Throws:
        java.io.IOException - if socket error occur
      • toString

        public java.lang.String toString()
        Specified by:
        toString in interface ParameterHolder
        Overrides:
        toString in class java.lang.Object