Interface IAimpStream
Interface provides methods for working with binary stream. Implements the System.IDisposable Implements the IAimpObject
Inherited Members
Namespace: AIMP.SDK
Assembly: AIMP.SDK.dll
Syntax
public interface IAimpStream : IDisposable, IAimpObject
Methods
GetPosition()
Gets the position of reading / writing cursor in bytes.
Declaration
long GetPosition()
GetSize()
Gets the size of stream, in bytes.
Declaration
long GetSize()
Read(Byte[], Int32)
Reads a block of bytes from the current stream and writes the data to a buffer.
Declaration
int Read(byte[] buffer, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | When this method returns, contains the specified byte array with the values from the current stream. |
System.Int32 | count | The maximum number of bytes to read. |
Seek(Int64, SeekOrigin)
Allows to change position of reading / writing cursor.
Declaration
AimpActionResult Seek(long offset, SeekOrigin mode)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | offset | Offset in bytes. |
System.IO.SeekOrigin | mode | A value of type System.IO.SeekOrigin indicating the reference point used to obtain the new position. |
SetSize(Int64)
Method provides an ability to set stream size, in bytes.
Note: size of stream will be automatically extended when it needed.This method is for optimization purposes only. Warning! If current stream size more than new defined - part of data will be truncated.
Declaration
AimpActionResult SetSize(long value)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | value | New size, in bytes. |
Write(Byte[], Int32, out Int32)
Writes a block of bytes to the current stream using data read from a buffer.
Declaration
AimpActionResult Write(byte[] buffer, int count, out int writen)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | The buffer to write data from. |
System.Int32 | count | The maximum number of bytes to write. |
System.Int32 | writen | Parameter displays what bytes has been really written to the stream. This parameter is optional - can be null. |