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.


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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.