Class FSTInputStream

java.lang.Object
java.io.InputStream
org.nustaq.serialization.util.FSTInputStream
All Implemented Interfaces:
java.io.Closeable, java.lang.AutoCloseable

public final class FSTInputStream
extends java.io.InputStream
Created with IntelliJ IDEA. User: ruedi Date: 27.11.12 Time: 00:35 To change this template use File | Settings | File Templates.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    byte[] buf  
    boolean byteBacked  
    static java.lang.ThreadLocal<byte[]> cachedBuffer  
    int chunk_size  
    int count  
    int pos  
    static boolean REPORT_READ_FAILS  
  • Constructor Summary

    Constructors 
    Constructor Description
    FSTInputStream​(byte[] buf)  
    FSTInputStream​(byte[] buf, int offset, int length)  
    FSTInputStream​(java.io.InputStream in)  
  • Method Summary

    Modifier and Type Method Description
    int available()  
    void close()  
    void ensureCapacity​(int siz)  
    void ensureReadAhead​(int bytes)  
    void initFromStream​(java.io.InputStream in)  
    boolean isFullyRead()  
    void mark​(int readAheadLimit)  
    boolean markSupported()  
    int read()  
    int read​(byte[] b, int off, int len)  
    void readNextChunk​(java.io.InputStream in)  
    void reset()  
    void resetForReuse​(byte[] b, int length)  
    long skip​(long n)  

    Methods inherited from class java.io.InputStream

    nullInputStream, read, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • resetForReuse

      public void resetForReuse​(byte[] b, int length)
    • initFromStream

      public void initFromStream​(java.io.InputStream in)
    • isFullyRead

      public boolean isFullyRead()
    • readNextChunk

      public void readNextChunk​(java.io.InputStream in)
    • ensureCapacity

      public void ensureCapacity​(int siz)
    • read

      public int read()
      Specified by:
      read in class java.io.InputStream
    • read

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

      public long skip​(long n)
      Overrides:
      skip in class java.io.InputStream
    • available

      public int available()
      Overrides:
      available in class java.io.InputStream
    • markSupported

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

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

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

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

      public void ensureReadAhead​(int bytes)