Class CustomObjectOutputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.io.DataOutput, java.io.Flushable, java.io.ObjectOutput, java.io.ObjectStreamConstants, java.lang.AutoCloseable

    public class CustomObjectOutputStream
    extends java.io.ObjectOutputStream
    • Field Detail

      • customFields

        private FastStack customFields
      • DATA_HOLDER_KEY

        private static final java.lang.String DATA_HOLDER_KEY
    • Method Detail

      • defaultWriteObject

        public void defaultWriteObject()
                                throws java.io.IOException
        Methods to delegate to callback
        Overrides:
        defaultWriteObject in class java.io.ObjectOutputStream
        Throws:
        java.io.IOException
      • writeObjectOverride

        protected void writeObjectOverride​(java.lang.Object obj)
                                    throws java.io.IOException
        Overrides:
        writeObjectOverride in class java.io.ObjectOutputStream
        Throws:
        java.io.IOException
      • writeBoolean

        public void writeBoolean​(boolean val)
                          throws java.io.IOException
        Specified by:
        writeBoolean in interface java.io.DataOutput
        Overrides:
        writeBoolean in class java.io.ObjectOutputStream
        Throws:
        java.io.IOException
      • writeByte

        public void writeByte​(int val)
                       throws java.io.IOException
        Specified by:
        writeByte in interface java.io.DataOutput
        Overrides:
        writeByte in class java.io.ObjectOutputStream
        Throws:
        java.io.IOException
      • writeInt

        public void writeInt​(int val)
                      throws java.io.IOException
        Specified by:
        writeInt in interface java.io.DataOutput
        Overrides:
        writeInt in class java.io.ObjectOutputStream
        Throws:
        java.io.IOException
      • writeChar

        public void writeChar​(int val)
                       throws java.io.IOException
        Specified by:
        writeChar in interface java.io.DataOutput
        Overrides:
        writeChar in class java.io.ObjectOutputStream
        Throws:
        java.io.IOException
      • writeDouble

        public void writeDouble​(double val)
                         throws java.io.IOException
        Specified by:
        writeDouble in interface java.io.DataOutput
        Overrides:
        writeDouble in class java.io.ObjectOutputStream
        Throws:
        java.io.IOException
      • writeFloat

        public void writeFloat​(float val)
                        throws java.io.IOException
        Specified by:
        writeFloat in interface java.io.DataOutput
        Overrides:
        writeFloat in class java.io.ObjectOutputStream
        Throws:
        java.io.IOException
      • writeLong

        public void writeLong​(long val)
                       throws java.io.IOException
        Specified by:
        writeLong in interface java.io.DataOutput
        Overrides:
        writeLong in class java.io.ObjectOutputStream
        Throws:
        java.io.IOException
      • writeShort

        public void writeShort​(int val)
                        throws java.io.IOException
        Specified by:
        writeShort in interface java.io.DataOutput
        Overrides:
        writeShort in class java.io.ObjectOutputStream
        Throws:
        java.io.IOException
      • write

        public void write​(byte[] buf)
                   throws java.io.IOException
        Specified by:
        write in interface java.io.DataOutput
        Specified by:
        write in interface java.io.ObjectOutput
        Overrides:
        write in class java.io.ObjectOutputStream
        Throws:
        java.io.IOException
      • writeChars

        public void writeChars​(java.lang.String str)
                        throws java.io.IOException
        Specified by:
        writeChars in interface java.io.DataOutput
        Overrides:
        writeChars in class java.io.ObjectOutputStream
        Throws:
        java.io.IOException
      • writeUTF

        public void writeUTF​(java.lang.String str)
                      throws java.io.IOException
        Specified by:
        writeUTF in interface java.io.DataOutput
        Overrides:
        writeUTF in class java.io.ObjectOutputStream
        Throws:
        java.io.IOException
      • write

        public void write​(int val)
                   throws java.io.IOException
        Specified by:
        write in interface java.io.DataOutput
        Specified by:
        write in interface java.io.ObjectOutput
        Overrides:
        write in class java.io.ObjectOutputStream
        Throws:
        java.io.IOException
      • write

        public void write​(byte[] buf,
                          int off,
                          int len)
                   throws java.io.IOException
        Specified by:
        write in interface java.io.DataOutput
        Specified by:
        write in interface java.io.ObjectOutput
        Overrides:
        write in class java.io.ObjectOutputStream
        Throws:
        java.io.IOException
      • flush

        public void flush()
                   throws java.io.IOException
        Specified by:
        flush in interface java.io.Flushable
        Specified by:
        flush in interface java.io.ObjectOutput
        Overrides:
        flush in class java.io.ObjectOutputStream
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface java.io.ObjectOutput
        Overrides:
        close in class java.io.ObjectOutputStream
        Throws:
        java.io.IOException
      • putFields

        public java.io.ObjectOutputStream.PutField putFields()
        Overrides:
        putFields in class java.io.ObjectOutputStream
      • writeFields

        public void writeFields()
                         throws java.io.IOException
        Overrides:
        writeFields in class java.io.ObjectOutputStream
        Throws:
        java.io.IOException
      • reset

        public void reset()
        Unsupported methods
        Overrides:
        reset in class java.io.ObjectOutputStream
      • useProtocolVersion

        public void useProtocolVersion​(int version)
        Overrides:
        useProtocolVersion in class java.io.ObjectOutputStream
      • writeBytes

        public void writeBytes​(java.lang.String str)
        Specified by:
        writeBytes in interface java.io.DataOutput
        Overrides:
        writeBytes in class java.io.ObjectOutputStream
      • writeUnshared

        public void writeUnshared​(java.lang.Object obj)
        Overrides:
        writeUnshared in class java.io.ObjectOutputStream