Class CustomObjectInputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.io.DataInput, java.io.ObjectInput, java.io.ObjectStreamConstants, java.lang.AutoCloseable

    public class CustomObjectInputStream
    extends java.io.ObjectInputStream
    • Field Detail

      • DATA_HOLDER_KEY

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

      • resolveClass

        protected java.lang.Class resolveClass​(java.io.ObjectStreamClass desc)
                                        throws java.io.IOException,
                                               java.lang.ClassNotFoundException
        Overrides:
        resolveClass in class java.io.ObjectInputStream
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • defaultReadObject

        public void defaultReadObject()
                               throws java.io.IOException
        Overrides:
        defaultReadObject in class java.io.ObjectInputStream
        Throws:
        java.io.IOException
      • readObjectOverride

        protected java.lang.Object readObjectOverride()
                                               throws java.io.IOException
        Overrides:
        readObjectOverride in class java.io.ObjectInputStream
        Throws:
        java.io.IOException
      • readUnshared

        public java.lang.Object readUnshared()
                                      throws java.io.IOException,
                                             java.lang.ClassNotFoundException
        Overrides:
        readUnshared in class java.io.ObjectInputStream
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • readBoolean

        public boolean readBoolean()
                            throws java.io.IOException
        Specified by:
        readBoolean in interface java.io.DataInput
        Overrides:
        readBoolean in class java.io.ObjectInputStream
        Throws:
        java.io.IOException
      • readByte

        public byte readByte()
                      throws java.io.IOException
        Specified by:
        readByte in interface java.io.DataInput
        Overrides:
        readByte in class java.io.ObjectInputStream
        Throws:
        java.io.IOException
      • readUnsignedByte

        public int readUnsignedByte()
                             throws java.io.IOException
        Specified by:
        readUnsignedByte in interface java.io.DataInput
        Overrides:
        readUnsignedByte in class java.io.ObjectInputStream
        Throws:
        java.io.IOException
      • readInt

        public int readInt()
                    throws java.io.IOException
        Specified by:
        readInt in interface java.io.DataInput
        Overrides:
        readInt in class java.io.ObjectInputStream
        Throws:
        java.io.IOException
      • readChar

        public char readChar()
                      throws java.io.IOException
        Specified by:
        readChar in interface java.io.DataInput
        Overrides:
        readChar in class java.io.ObjectInputStream
        Throws:
        java.io.IOException
      • readFloat

        public float readFloat()
                        throws java.io.IOException
        Specified by:
        readFloat in interface java.io.DataInput
        Overrides:
        readFloat in class java.io.ObjectInputStream
        Throws:
        java.io.IOException
      • readDouble

        public double readDouble()
                          throws java.io.IOException
        Specified by:
        readDouble in interface java.io.DataInput
        Overrides:
        readDouble in class java.io.ObjectInputStream
        Throws:
        java.io.IOException
      • readLong

        public long readLong()
                      throws java.io.IOException
        Specified by:
        readLong in interface java.io.DataInput
        Overrides:
        readLong in class java.io.ObjectInputStream
        Throws:
        java.io.IOException
      • readShort

        public short readShort()
                        throws java.io.IOException
        Specified by:
        readShort in interface java.io.DataInput
        Overrides:
        readShort in class java.io.ObjectInputStream
        Throws:
        java.io.IOException
      • readUnsignedShort

        public int readUnsignedShort()
                              throws java.io.IOException
        Specified by:
        readUnsignedShort in interface java.io.DataInput
        Overrides:
        readUnsignedShort in class java.io.ObjectInputStream
        Throws:
        java.io.IOException
      • readUTF

        public java.lang.String readUTF()
                                 throws java.io.IOException
        Specified by:
        readUTF in interface java.io.DataInput
        Overrides:
        readUTF in class java.io.ObjectInputStream
        Throws:
        java.io.IOException
      • readFully

        public void readFully​(byte[] buf)
                       throws java.io.IOException
        Specified by:
        readFully in interface java.io.DataInput
        Overrides:
        readFully in class java.io.ObjectInputStream
        Throws:
        java.io.IOException
      • readFully

        public void readFully​(byte[] buf,
                              int off,
                              int len)
                       throws java.io.IOException
        Specified by:
        readFully in interface java.io.DataInput
        Overrides:
        readFully in class java.io.ObjectInputStream
        Throws:
        java.io.IOException
      • read

        public int read()
                 throws java.io.IOException
        Specified by:
        read in interface java.io.ObjectInput
        Overrides:
        read in class java.io.ObjectInputStream
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] buf,
                        int off,
                        int len)
                 throws java.io.IOException
        Specified by:
        read in interface java.io.ObjectInput
        Overrides:
        read in class java.io.ObjectInputStream
        Throws:
        java.io.IOException
      • read

        public int read​(byte[] b)
                 throws java.io.IOException
        Specified by:
        read in interface java.io.ObjectInput
        Overrides:
        read in class java.io.InputStream
        Throws:
        java.io.IOException
      • readFields

        public java.io.ObjectInputStream.GetField readFields()
                                                      throws java.io.IOException
        Overrides:
        readFields in class java.io.ObjectInputStream
        Throws:
        java.io.IOException
      • registerValidation

        public void registerValidation​(java.io.ObjectInputValidation validation,
                                       int priority)
                                throws java.io.NotActiveException,
                                       java.io.InvalidObjectException
        Overrides:
        registerValidation in class java.io.ObjectInputStream
        Throws:
        java.io.NotActiveException
        java.io.InvalidObjectException
      • 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.ObjectInput
        Overrides:
        close in class java.io.ObjectInputStream
        Throws:
        java.io.IOException
      • available

        public int available()
        Unsupported methods
        Specified by:
        available in interface java.io.ObjectInput
        Overrides:
        available in class java.io.ObjectInputStream
      • readLine

        public java.lang.String readLine()
        Specified by:
        readLine in interface java.io.DataInput
        Overrides:
        readLine in class java.io.ObjectInputStream
      • skipBytes

        public int skipBytes​(int len)
        Specified by:
        skipBytes in interface java.io.DataInput
        Overrides:
        skipBytes in class java.io.ObjectInputStream
      • skip

        public long skip​(long n)
        Specified by:
        skip in interface java.io.ObjectInput
        Overrides:
        skip in class java.io.InputStream
      • mark

        public void mark​(int readlimit)
        Overrides:
        mark in class java.io.InputStream
      • reset

        public void reset()
        Overrides:
        reset in class java.io.InputStream
      • markSupported

        public boolean markSupported()
        Overrides:
        markSupported in class java.io.InputStream