PartialInputStream

class PartialInputStream extends InputStream

This is an implementation of java.io.InputStream that represents part of data read from an InputStream.

Author:cyng

Constructors

PartialInputStream

PartialInputStream(InputStream in, long offset, long length)

Constructor for the PartialInputStream object

Parameters:
  • in – the origninal input stream
  • offset – the offset the read data from the stream.
  • length – the length of the data to be read
Throws:
  • IOException – Description of the Exception

Methods

close

public void close()

close the stream

Throws:
  • IOException – thrown when IO error occur during closing

read

public int read()

read a byte from the stream

Throws:
  • IOException – thrown when IO error occur during reading.
Returns:

the byte in int value from the stream.