|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xbig.base.NativeObject
org.ogre4j.MemoryDataStream
public class MemoryDataStream
| Field Summary |
|---|
| Fields inherited from class org.xbig.base.NativeObject |
|---|
deleted, object, remote |
| Constructor Summary | |
|---|---|
|
MemoryDataStream(IDataStream sourceStream,
boolean freeOnClose)
Create a stream which pre-buffers the contents of another stream. |
|
MemoryDataStream(IDataStreamPtr sourceStream,
boolean freeOnClose)
Create a stream which pre-buffers the contents of another stream. |
|
MemoryDataStream(InstancePointer p)
This constructor is public for internal useage only! |
protected |
MemoryDataStream(InstancePointer p,
boolean remote)
Creates a Java wrapper object for an existing C++ object. |
|
MemoryDataStream(int size,
boolean freeOnClose)
Create a stream with a brand new empty memory chunk. |
|
MemoryDataStream(java.lang.String name,
IDataStream sourceStream,
boolean freeOnClose)
Create a named stream which pre-buffers the contents of another stream. |
|
MemoryDataStream(java.lang.String name,
IDataStreamPtr sourceStream,
boolean freeOnClose)
Create a named stream which pre-buffers the contents of another stream. |
|
MemoryDataStream(java.lang.String name,
int size,
boolean freeOnClose)
Create a named stream with a brand new empty memory chunk. |
|
MemoryDataStream(java.lang.String name,
VoidPointer pMem,
int size,
boolean freeOnClose)
Wrap an existing memory chunk in a named stream. |
|
MemoryDataStream(VoidPointer pMem,
int size,
boolean freeOnClose)
Wrap an existing memory chunk in a stream. |
|
MemoryDataStream(WithoutNativeObject val)
Allows creation of Java objects without C++ objects. |
| Method Summary | |
|---|---|
void |
close()
Close the stream; this makes further operations invalid. |
void |
delete()
Deletes the corresponding C++ object. |
boolean |
eof()
Returns true if the stream has reached the end. |
void |
finalize()
|
java.lang.String |
getAsString()
Returns a String containing the entire stream. |
ShortPointer |
getCurrentPtr()
Get a pointer to the current position in the memory block this stream holds. |
java.lang.String |
getLine(boolean trimAfter)
Returns a String containing the next line of data, optionally trimmed for whitespace. |
java.lang.String |
getName()
|
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. |
int |
size()
Returns the total size of the data to be read from the stream, or 0 if this is indeterminate for this stream. |
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 class org.xbig.base.NativeObject |
|---|
disconnectFromNativeObject, equals, getInstancePointer, hashCode, setInstancePointer, setInstancePointer, setInstancePointer, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.xbig.base.INativeObject |
|---|
disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer |
| Constructor Detail |
|---|
public MemoryDataStream(InstancePointer p)
protected MemoryDataStream(InstancePointer p,
boolean remote)
public MemoryDataStream(WithoutNativeObject val)
WithoutNativeObject,
INativeObject.disconnectFromNativeObject()
public MemoryDataStream(VoidPointer pMem,
int size,
boolean freeOnClose)
public MemoryDataStream(java.lang.String name,
VoidPointer pMem,
int size,
boolean freeOnClose)
public MemoryDataStream(IDataStream sourceStream,
boolean freeOnClose)
public MemoryDataStream(IDataStreamPtr sourceStream,
boolean freeOnClose)
public MemoryDataStream(java.lang.String name,
IDataStream sourceStream,
boolean freeOnClose)
public MemoryDataStream(java.lang.String name,
IDataStreamPtr sourceStream,
boolean freeOnClose)
public MemoryDataStream(int size,
boolean freeOnClose)
public MemoryDataStream(java.lang.String name,
int size,
boolean freeOnClose)
| Method Detail |
|---|
public void delete()
INativeObjectSubclasses must implement this but if the native instance was created by the underlying library the native call to dispose must not happen!
delete in interface INativeObjectdelete in class NativeObject#remotepublic void finalize()
finalize in class NativeObjectpublic ShortPointer getPtr()
getPtr in interface IMemoryDataStreampublic ShortPointer getCurrentPtr()
getCurrentPtr in interface IMemoryDataStream
public int read(VoidPointer buf,
int count)
IDataStream
read in interface IDataStreamread in interface IMemoryDataStream
public int readLine(BytePointer buf,
int maxCount,
java.lang.String delim)
IDataStream
readLine in interface IDataStreamreadLine in interface IMemoryDataStreampublic int skipLine(java.lang.String delim)
IDataStream
skipLine in interface IDataStreamskipLine in interface IMemoryDataStreampublic void skip(long count)
IDataStream
skip in interface IDataStreamskip in interface IMemoryDataStreampublic void seek(int pos)
IDataStream
seek in interface IDataStreamseek in interface IMemoryDataStreampublic int tell()
IDataStream
tell in interface IDataStreamtell in interface IMemoryDataStreampublic boolean eof()
IDataStream
eof in interface IDataStreameof in interface IMemoryDataStreampublic void close()
IDataStream
close in interface IDataStreamclose in interface IMemoryDataStreampublic void setFreeOnClose(boolean free)
setFreeOnClose in interface IMemoryDataStreampublic java.lang.String getName()
getName in interface IDataStreampublic java.lang.String getLine(boolean trimAfter)
getLine in interface IDataStreampublic java.lang.String getAsString()
getAsString in interface IDataStreampublic int size()
size in interface IDataStream
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||