org.javaswift.joss.instructions
Class FixedLengthInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.javaswift.joss.instructions.FixedLengthInputStream
All Implemented Interfaces:
Closeable

public class FixedLengthInputStream
extends InputStream

The purpose of this class is to read a limited number of bytes. It is used to read from a RandomAccessFile and it supports the segmentation strategy. Inspired by http://stackoverflow.com/questions/2888335/how-can-i-create-constrained-inputstream-to-read-only-part-of-the-file


Constructor Summary
FixedLengthInputStream(InputStream decorated, long length)
           
 
Method Summary
 int read()
           
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixedLengthInputStream

public FixedLengthInputStream(InputStream decorated,
                              long length)
Method Detail

read

public int read()
         throws IOException
Specified by:
read in class InputStream
Throws:
IOException


Copyright © 2012-2014 42 BV. All Rights Reserved.