org.ogre4j
Interface IMemoryDataStream

All Superinterfaces:
IAllocatedObject<IGeneralAllocPolicy>, IDataStream, IGeneralAllocatedObject, INativeObject
All Known Implementing Classes:
MemoryDataStream

public interface IMemoryDataStream
extends INativeObject, IDataStream


Method Summary
 void close()
          Close the stream; this makes further operations invalid.
 boolean eof()
          Returns true if the stream has reached the end.
 ShortPointer getCurrentPtr()
          Get a pointer to the current position in the memory block this stream holds.
 ShortPointer getPtr()
          Get a pointer to the start of the memory block this stream holds.
 int read(VoidPointer buf, int count)
          Read the requisite number of bytes from the stream, stopping at the end of the file.
 int readLine(BytePointer buf, int maxCount, java.lang.String delim)
          Get a single line from the stream.
 void seek(int pos)
          Repositions the read point to a specified byte.
 void setFreeOnClose(boolean free)
          Sets whether or not to free the encapsulated memory on close.
 void skip(long count)
          Skip a defined number of bytes.
 int skipLine(java.lang.String delim)
          Skip a single line from the stream.
 int tell()
          Returns the current byte offset from beginning
 
Methods inherited from interface org.ogre4j.IDataStream
getAsString, getLine, getName, size
 
Methods inherited from interface org.xbig.base.INativeObject
delete, disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Method Detail

getPtr

ShortPointer getPtr()
Get a pointer to the start of the memory block this stream holds.


getCurrentPtr

ShortPointer getCurrentPtr()
Get a pointer to the current position in the memory block this stream holds.


read

int read(VoidPointer buf,
         int count)
Description copied from interface: IDataStream
Read the requisite number of bytes from the stream, stopping at the end of the file.

Specified by:
read in interface IDataStream

readLine

int readLine(BytePointer buf,
             int maxCount,
             java.lang.String delim)
Description copied from interface: IDataStream
Get a single line from the stream.

Specified by:
readLine in interface IDataStream

skipLine

int skipLine(java.lang.String delim)
Description copied from interface: IDataStream
Skip a single line from the stream.

Specified by:
skipLine in interface IDataStream

skip

void skip(long count)
Description copied from interface: IDataStream
Skip a defined number of bytes. This can also be a negative value, in which case the file pointer rewinds a defined number of bytes.

Specified by:
skip in interface IDataStream

seek

void seek(int pos)
Description copied from interface: IDataStream
Repositions the read point to a specified byte.

Specified by:
seek in interface IDataStream

tell

int tell()
Description copied from interface: IDataStream
Returns the current byte offset from beginning

Specified by:
tell in interface IDataStream

eof

boolean eof()
Description copied from interface: IDataStream
Returns true if the stream has reached the end.

Specified by:
eof in interface IDataStream

close

void close()
Description copied from interface: IDataStream
Close the stream; this makes further operations invalid.

Specified by:
close in interface IDataStream

setFreeOnClose

void setFreeOnClose(boolean free)
Sets whether or not to free the encapsulated memory on close.



Copyright © 2007 netAllied GmbH. All Rights Reserved.