Class Cloner.FastByteArrayInputStream

java.lang.Object
java.io.InputStream
io.github.ai4ci.util.Cloner.FastByteArrayInputStream
All Implemented Interfaces:
Closeable, AutoCloseable
Enclosing class:
Cloner

public static class Cloner.FastByteArrayInputStream extends InputStream
ByteArrayInputStream implementation that does not synchronize methods.
  • Field Details

    • 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 Details

    • FastByteArrayInputStream

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

    • available

      public final int available()
      Overrides:
      available in class InputStream
    • read

      public final int read()
      Specified by:
      read in class InputStream
    • 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