aspose.pdf
Class BasicStream

java.lang.Object
  extended by aspose.pdf.BasicStream
Direct Known Subclasses:
BinaryFileStream, MemStream, TextFileStream

public class BasicStream
extends java.lang.Object

Represents basic stream.


Field Summary
protected  boolean canRead
          stream CanRead.
protected  boolean canSeek
          stream CanRead.
protected  boolean canWrite
          stream CanRead.
protected  long length
          stream length.
protected  long seek
          stream position.
 
Constructor Summary
BasicStream()
          Construct a BasicStream instance.
BasicStream(java.io.InputStream input)
          Construct a BasicStream instance.
 
Method Summary
 void close()
          abstract method for stream close.
 void flush()
          abstract method for stream flush.
 boolean getCanRead()
          Gets a value indicating whether the current stream supports reading.
 boolean getCanSeek()
          Gets a value of false indicating seeking is not supported for this stream.
 boolean getCanWrite()
          Gets a value of false indicating that this stream is not writable.
 long getLength()
          Gets the length of the stream.
 long getSeek()
          Gets the current position.
 int read()
          abstract method for stream read.
 int read(byte[] in, int offset, int count)
          Abstract method for stream read.
 byte readByte()
          Abstract method for stream read.
 void setCanRead(boolean value)
          Set a value indicating whether the current stream supports reading.
 void setCanSeek(boolean value)
          Sets a value indicating whether the current stream supports seeking.
 void setCanWrite(boolean value)
          Sets a value indicating whether the current stream supports writing.
 void setLength(long value)
          Sets the stream length.
 void setSeek(long value)
          Sets the current position.
 void setSeek(long orig, long offset)
          Sets the offset.
 void skip(long number)
          abstract method for stream skip.
 void write()
          Abstract method for stream write.
 void write(byte temp)
          Abstract method for stream write.
 void write(byte[] temp)
          Abstract method for stream write.
 void write(byte[] temp, int offset, int count)
          Abstract method for stream write.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

seek

protected long seek
stream position.


length

protected long length
stream length.


canRead

protected boolean canRead
stream CanRead.


canSeek

protected boolean canSeek
stream CanRead.


canWrite

protected boolean canWrite
stream CanRead.

Constructor Detail

BasicStream

public BasicStream()
Construct a BasicStream instance.


BasicStream

public BasicStream(java.io.InputStream input)
Construct a BasicStream instance.

Parameters:
input - The InputStream object.
Method Detail

getCanRead

public boolean getCanRead()
Gets a value indicating whether the current stream supports reading.


setCanRead

public void setCanRead(boolean value)
Set a value indicating whether the current stream supports reading.

Parameters:
value - Whether the stream supports reading.

getCanSeek

public boolean getCanSeek()
Gets a value of false indicating seeking is not supported for this stream.


setCanSeek

public void setCanSeek(boolean value)
Sets a value indicating whether the current stream supports seeking.

Parameters:
value - Whether the stream supports seeking.

getCanWrite

public boolean getCanWrite()
Gets a value of false indicating that this stream is not writable.


setCanWrite

public void setCanWrite(boolean value)
Sets a value indicating whether the current stream supports writing.

Parameters:
value - The position.

getSeek

public long getSeek()
Gets the current position.


setSeek

public void setSeek(long value)
Sets the current position.

Parameters:
value - The position.

setSeek

public void setSeek(long orig,
                    long offset)
Sets the offset.

Parameters:
orig - The original value.
offset - The offset.

getLength

public long getLength()
Gets the length of the stream.

Returns:
The length of the stream.

setLength

public void setLength(long value)
Sets the stream length.

Parameters:
value - The length of the stream.

read

public int read()
         throws java.io.IOException
abstract method for stream read.

Throws:
java.io.IOException

readByte

public byte readByte()
              throws java.io.IOException
Abstract method for stream read.

Throws:
java.io.IOException

read

public int read(byte[] in,
                int offset,
                int count)
         throws java.io.IOException
Abstract method for stream read.

Throws:
java.io.IOException

skip

public void skip(long number)
          throws java.io.IOException
abstract method for stream skip.

Throws:
java.io.IOException

write

public void write()
           throws java.io.IOException
Abstract method for stream write.

Throws:
java.io.IOException

write

public void write(byte[] temp,
                  int offset,
                  int count)
           throws java.io.IOException
Abstract method for stream write.

Throws:
java.io.IOException

write

public void write(byte[] temp)
Abstract method for stream write.


write

public void write(byte temp)
Abstract method for stream write.


flush

public void flush()
           throws java.io.IOException
abstract method for stream flush.

Throws:
java.io.IOException

close

public void close()
abstract method for stream close.