FDO .NET API Reference Feature Data Objects
Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

OSGeo::FDO::Common::Io::IoByteStreamReader Class Reference

Inherits OSGeo::FDO::Common::IStreamReaderImp.

Inheritance diagram for OSGeo::FDO::Common::Io::IoByteStreamReader:

[legend]
List of all members.

Detailed Description

IoByteStreamReader is an FDO reader for a Byte stream.


Public Member Functions

__property System::Int64 get_Index ()
 Gets the current stream position. Position is measured by number of items from the stream start.
__property System::Int64 get_Length ()
 Gets the stream length.
 IoByteStreamReader (System::IntPtr unmanaged, System::Boolean autoDelete)
 Constructs a stream reader based on an unmanaged instance of the object.
 IoByteStreamReader (OSGeo::FDO::Common::Io::IoStream *stream)
 Creates a Byte Stream reader. Reads binary data from an IoStream.
System::Int32 ReadNext (System::Byte buffer[], System::Int32 offset, System::Int32 count)
 Reads in the next block of items. Use ReadNext( buffer) to read in the entire stream. The caller is responsible to allocate a buffer large enough to store data.
System::Int32 ReadNext (System::Byte buffer[], System::Int32 offset)
 Reads in the next block of items. Use ReadNext( buffer) to read in the entire stream. The caller is responsible to allocate a buffer large enough to store data.
System::Int32 ReadNext (System::Byte buffer[])
 Reads in the next block of items. The caller is responsible to allocate a buffer large enough to store data.
System::Void Reset ()
 Resets the current index to the stream start. Allows re-reading.
System::Void Skip (System::Int32 offset)
 Skips a number of items.

Constructor & Destructor Documentation

OSGeo::FDO::Common::Io::IoByteStreamReader::IoByteStreamReader OSGeo::FDO::Common::Io::IoStream stream  ) 
 

Creates a Byte Stream reader. Reads binary data from an IoStream.

Parameters:
stream Input the stream to read from

OSGeo::FDO::Common::Io::IoByteStreamReader::IoByteStreamReader System::IntPtr  unmanaged,
System::Boolean  autoDelete
 

Constructs a stream reader based on an unmanaged instance of the object.

Parameters:
unmanaged Input A Pointer to the unmanaged stream reader.
autoDelete Input Indicates if the constructed object should be automatically deleted once it no longer referenced.

Member Function Documentation

__property System::Int64 OSGeo::FDO::Common::Io::IoByteStreamReader::get_Index  ) 
 

Gets the current stream position. Position is measured by number of items from the stream start.

Returns:
Returns the current index in the stream

__property System::Int64 OSGeo::FDO::Common::Io::IoByteStreamReader::get_Length  ) 
 

Gets the stream length.

Returns:
Returns the size of the data source in number of items

System::Int32 OSGeo::FDO::Common::Io::IoByteStreamReader::ReadNext System::Byte  buffer[],
System::Int32  offset,
System::Int32  count
 

Reads in the next block of items. Use ReadNext( buffer) to read in the entire stream. The caller is responsible to allocate a buffer large enough to store data.

Parameters:
buffer Output array holding data read in.
offset Input index in the array indicating the beginning of the output buffer. If zero, then the buffer is reused. If the end of the buffer, then read in appending mode. Throws "out-of-bounds" exception if not in this range.
count Input number of items to be read in. If -1 read the entire stream. Throws "out-of-bounds" exception if not a positive value or -1.
Returns:
Returns the number of items actually read in. When 0 (zero) then the end-of-stream was reached.

System::Int32 OSGeo::FDO::Common::Io::IoByteStreamReader::ReadNext System::Byte  buffer[],
System::Int32  offset
 

Reads in the next block of items. Use ReadNext( buffer) to read in the entire stream. The caller is responsible to allocate a buffer large enough to store data.

Parameters:
buffer Output array holding data read in.
offset Input index in the array indicating the beginning of the output buffer. If zero, then the buffer is reused. If the end of the buffer, then read in appending mode. Throws "out-of-bounds" exception if not in this range.
Returns:
Returns the number of items actually read in. When 0 (zero) then the end-of-stream was reached.

System::Int32 OSGeo::FDO::Common::Io::IoByteStreamReader::ReadNext System::Byte  buffer[]  ) 
 

Reads in the next block of items. The caller is responsible to allocate a buffer large enough to store data.

Parameters:
buffer Output array holding data read in.
Returns:
Returns the number of items actually read in. When 0 (zero) then the end-of-stream was reached.

System::Void OSGeo::FDO::Common::Io::IoByteStreamReader::Reset  ) 
 

Resets the current index to the stream start. Allows re-reading.

System::Void OSGeo::FDO::Common::Io::IoByteStreamReader::Skip System::Int32  offset  ) 
 

Skips a number of items.

Parameters:
offset Input number of items to skip

Comments or suggestions? Send us feedback.