org.crsh.util
Class SubInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.crsh.util.SubInputStream
All Implemented Interfaces:
Closeable

public class SubInputStream
extends InputStream

A stream that reads a portion of a delegate input stream. The impl is very basic and could be improved but it is enough at the moment.

Version:
$Revision$
Author:
Julien Viet

Field Summary
private  long count
          .
private  InputStream in
          .
private  long length
          .
 
Constructor Summary
SubInputStream(InputStream in, 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
 

Field Detail

in

private final InputStream in
.


length

private final long length
.


count

private long count
.

Constructor Detail

SubInputStream

public SubInputStream(InputStream in,
                      long length)
Method Detail

read

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


Copyright © 2012 eXo Platform SAS. All Rights Reserved.