Class Js5InputStream

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

    public class Js5InputStream
    extends java.io.DataInputStream
    • Constructor Summary

      Constructors 
      Constructor Description
      Js5InputStream​(byte[] data)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void decipherXTEA​(int[] keys, int lengthOfEncrypted)  
      byte[] getBackingArray()  
      static char getCP1252ReplacementAt​(int index)
      Deprecated.
      for internal use only
      void mark​(int readlimit)  
      int position()  
      int read24BitInt()  
      int readBytes​(int amount)  
      int readBytes​(int amount, int offset)  
      java.lang.String readCStyleLatin1String()  
      int readDefaultableUnsignedSmart()
      Reads an unsigned smart that can return -1, to indicate a default or "null" value.
      java.lang.String readFailFastCString()  
      java.lang.String readJstr()  
      int readQuarterBoundSmart()
      Reads a compressed int from the stream with either a value between -64 and 191 or -49152 and 16383 (Short.MAX_VALUE / 2)
      int readReducedShortSmart()
      Reads a compressed int from the stream with either a value between 0 and Byte.MAX_VALUE (127) or Short.MIN_VALUE (-32768) and Short.MAX_VALUE (32767)
      int readShortSmart()  
      int readUnsignedIntSmartShortCompat()  
      int readUnsignedSmart()
      Reads a compressed int from the stream with either a value between 0 and Integer.MAX_VALUE (2147483647) or 0 and UnsignedShort.MAX_VALUE (65535)
      int readVarInt2()  
      void seek​(int position)  
      int size()  
      void write​(byte[] bytes)  
      void write​(int i)  
      void write​(int i, java.nio.ByteOrder order)  
      • Methods inherited from class java.io.DataInputStream

        read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytes
      • Methods inherited from class java.io.FilterInputStream

        available, close, markSupported, read, reset, skip
      • Methods inherited from class java.io.InputStream

        nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
      • Methods inherited from class java.lang.Object

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

      • Js5InputStream

        public Js5InputStream​(byte[] data)
    • Method Detail

      • getCP1252ReplacementAt

        @Deprecated
        public static char getCP1252ReplacementAt​(int index)
        Deprecated.
        for internal use only
      • decipherXTEA

        public void decipherXTEA​(int[] keys,
                                 int lengthOfEncrypted)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • getBackingArray

        public byte[] getBackingArray()
      • mark

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

        public int position()
      • readBytes

        public int readBytes​(int amount)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • readBytes

        public int readBytes​(int amount,
                             int offset)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • readDefaultableUnsignedSmart

        public int readDefaultableUnsignedSmart()
                                         throws java.io.IOException
        Reads an unsigned smart that can return -1, to indicate a default or "null" value.
        Throws:
        java.io.IOException
      • readJstr

        public final java.lang.String readJstr()
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • readFailFastCString

        public final java.lang.String readFailFastCString()
                                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • read24BitInt

        public final int read24BitInt()
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • readQuarterBoundSmart

        public int readQuarterBoundSmart()
                                  throws java.io.IOException
        Reads a compressed int from the stream with either a value between -64 and 191 or -49152 and 16383 (Short.MAX_VALUE / 2)
        Throws:
        java.io.IOException
      • readReducedShortSmart

        public int readReducedShortSmart()
                                  throws java.io.IOException
        Reads a compressed int from the stream with either a value between 0 and Byte.MAX_VALUE (127) or Short.MIN_VALUE (-32768) and Short.MAX_VALUE (32767)
        Throws:
        java.io.IOException
      • readShortSmart

        public int readShortSmart()
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • readUnsignedIntSmartShortCompat

        public int readUnsignedIntSmartShortCompat()
                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • readCStyleLatin1String

        public final java.lang.String readCStyleLatin1String()
                                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • readUnsignedSmart

        public int readUnsignedSmart()
                              throws java.io.IOException
        Reads a compressed int from the stream with either a value between 0 and Integer.MAX_VALUE (2147483647) or 0 and UnsignedShort.MAX_VALUE (65535)
        Throws:
        java.io.IOException
      • readVarInt2

        public int readVarInt2()
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • seek

        public void seek​(int position)
      • size

        public int size()
      • write

        public void write​(int i)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • write

        public void write​(int i,
                          java.nio.ByteOrder order)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • write

        public void write​(byte[] bytes)
                   throws java.io.IOException
        Throws:
        java.io.IOException