Class FastByteArrayInputStream

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class FastByteArrayInputStream
    extends InputStream
    ByteArrayInputStream implementation that does not synchronize methods.
    • Field Detail

      • buf

        protected byte[] buf
        Our byte buffer
      • count

        protected int count
        Number of bytes that we can read from the buffer
      • pos

        protected int pos
        Number of bytes that have been read from the buffer
    • Constructor Detail

      • FastByteArrayInputStream

        public FastByteArrayInputStream​(byte[] buf)
      • FastByteArrayInputStream

        public FastByteArrayInputStream​(byte[] buf,
                                        int count)
    • Method Detail

      • read

        public final int read​(byte[] b,
                              int off,
                              int len)
        Overrides:
        read in class InputStream
      • skip

        public final long skip​(long n)
        Overrides:
        skip in class InputStream