com.aspose.slides
Class StreamWrapper

java.lang.Object
  extended by com.aspose.slides.StreamWrapper
All Implemented Interfaces:
com.aspose.ms.System.IDisposable, IStreamWrapper

public class StreamWrapper
extends java.lang.Object
implements IStreamWrapper

Aspose.IO.Stream wrapper for COM interface.


Method Summary
 boolean canRead()
           Gets a value indicating whether the current stream supports reading.
 boolean canSeek()
           Gets a value indicating whether the current stream supports seeking.
 boolean canWrite()
           Gets a value indicating whether the current stream supports writing.
 void close()
           Closes the current stream and releases any resources.
 void dispose()
           
 void flush()
           Clears all buffers for this stream and causes any buffered data to be written to the underlying device.
 long getLength()
           Gets the length in bytes of the stream.
 long getPosition()
           Gets or sets the position within the current stream.
 java.io.OutputStream getStream()
           
 void read(byte[] buffer, int offset, int count)
           Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
 int readByte()
           Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream.
 long seek(long offset, int origin)
           Sets the position within the current stream
 void write(byte[] buffer, int offset, int count)
           writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
 void writeByte(byte value)
           Writes a byte to the current position in the stream and advances the position within the stream by one byte.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getStream

public java.io.OutputStream getStream()
Specified by:
getStream in interface IStreamWrapper

canRead

public boolean canRead()

Gets a value indicating whether the current stream supports reading.

Specified by:
canRead in interface IStreamWrapper

canSeek

public boolean canSeek()

Gets a value indicating whether the current stream supports seeking.

Specified by:
canSeek in interface IStreamWrapper

canWrite

public boolean canWrite()

Gets a value indicating whether the current stream supports writing.

Specified by:
canWrite in interface IStreamWrapper

getLength

public long getLength()

Gets the length in bytes of the stream.

Specified by:
getLength in interface IStreamWrapper

getPosition

public long getPosition()

Gets or sets the position within the current stream.

Specified by:
getPosition in interface IStreamWrapper

close

public void close()

Closes the current stream and releases any resources.

Specified by:
close in interface IStreamWrapper

dispose

public void dispose()
Specified by:
dispose in interface com.aspose.ms.System.IDisposable

flush

public void flush()

Clears all buffers for this stream and causes any buffered data to be written to the underlying device.

Specified by:
flush in interface IStreamWrapper

read

public void read(byte[] buffer,
                 int offset,
                 int count)

Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.

Specified by:
read in interface IStreamWrapper

readByte

public int readByte()

Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream.

Specified by:
readByte in interface IStreamWrapper
Returns:

seek

public long seek(long offset,
                 int origin)

Sets the position within the current stream

Specified by:
seek in interface IStreamWrapper

write

public void write(byte[] buffer,
                  int offset,
                  int count)

writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.

Specified by:
write in interface IStreamWrapper

writeByte

public void writeByte(byte value)

Writes a byte to the current position in the stream and advances the position within the stream by one byte.

Specified by:
writeByte in interface IStreamWrapper
Parameters:
value -