# org.pdfclown.bytes.Stream Class Reference

Generic stream. More...

Inheritance diagram for org.pdfclown.bytes.Stream:

List of all members.

## Public Member Functions
void | Dispose ()
override int | GetHashCode ()
| Gets the hash representation of the sequence.
void | Read (byte[] data, int offset, int count)
| Reads a sequence of bytes.
void | Read (byte[] data)
| Reads a sequence of bytes.
int | ReadByte ()
| Reads a byte.
int | ReadInt (int length)
| Reads a variable-length integer.
int | ReadInt ()
| Reads an integer.
string | ReadLine ()
| Reads the next line of text.
short | ReadShort ()
| Reads a short integer.
sbyte | ReadSignedByte ()
| Reads a signed byte integer.
string | ReadString (int length)
| Reads a string.
ushort | ReadUnsignedShort ()
| Reads an unsigned short integer.
void | Seek (long offset)
| Sets the pointer absolute position.
void | Skip (long offset)
| Sets the pointer relative position.
| Stream (System.IO.Stream stream)
byte[] | ToByteArray ()
| Gets the buffer data copied to a newly-allocated byte array.
void | Write (IInputStream data)
| Writes an IInputStream into the stream.
void | Write (string data)
| Writes a string into the stream.
void | Write (byte[] data, int offset, int length)
| Writes a byte range into the stream.
void | Write (byte[] data)
| Writes a byte array into the stream.
## Properties
ByteOrderEnum | ByteOrder`[get, set]`
| Gets/Sets the byte order.
long | Length`[get]`
| Gets the length of the stream.
long | Position`[get, set]`
| Gets/Sets the pointer position.

##

Generic stream.

## Constructor & Destructor Documentation

org.pdfclown.bytes.Stream.Stream | ( | System.IO.Stream | stream | ) |

## Member Function Documentation

void org.pdfclown.bytes.Stream.Dispose | ( |  | ) |

override int org.pdfclown.bytes.Stream.GetHashCode | ( |  | ) |

Gets the hash representation of the sequence.

Implements org.pdfclown.bytes.IInputStream.

void org.pdfclown.bytes.Stream.Read | ( | byte[] | data,
|  | int | offset,
|  | int | length |
| ) |  |  |

Reads a sequence of bytes.

This operation causes the stream pointer to advance after the read data.

Parameters:

  | data | Target byte array.
  | offset | Location in the byte array at which storing begins.
  | length | Number of bytes to read.

Implements org.pdfclown.bytes.IInputStream.

void org.pdfclown.bytes.Stream.Read | ( | byte[] | data | ) |

Reads a sequence of bytes.

This operation causes the stream pointer to advance after the read data.

Parameters:

  | data | Target byte array.

Implements org.pdfclown.bytes.IInputStream.

int org.pdfclown.bytes.Stream.ReadByte | ( |  | ) |

Reads a byte.

This operation causes the stream pointer to advance after the read data.

Implements org.pdfclown.bytes.IInputStream.

int org.pdfclown.bytes.Stream.ReadInt | ( | int | length | ) |

Reads a variable-length integer.

This operation causes the stream pointer to advance after the read data.

Parameters:

  | length | Number of bytes to read.

Implements org.pdfclown.bytes.IInputStream.

int org.pdfclown.bytes.Stream.ReadInt | ( |  | ) |

Reads an integer.

This operation causes the stream pointer to advance after the read data.

Implements org.pdfclown.bytes.IInputStream.

string org.pdfclown.bytes.Stream.ReadLine | ( |  | ) |

Reads the next line of text.

This operation causes the stream pointer to advance after the read data.

Implements org.pdfclown.bytes.IInputStream.

short org.pdfclown.bytes.Stream.ReadShort | ( |  | ) |

Reads a short integer.

This operation causes the stream pointer to advance after the read data.

Implements org.pdfclown.bytes.IInputStream.

sbyte org.pdfclown.bytes.Stream.ReadSignedByte | ( |  | ) |

Reads a signed byte integer.

This operation causes the stream pointer to advance after the read data.

Implements org.pdfclown.bytes.IInputStream.

string org.pdfclown.bytes.Stream.ReadString | ( | int | length | ) |

Reads a string.

This operation causes the stream pointer to advance after the read data.

Parameters:

  | length | Number of bytes to read.

Implements org.pdfclown.bytes.IInputStream.

ushort org.pdfclown.bytes.Stream.ReadUnsignedShort | ( |  | ) |

Reads an unsigned short integer.

This operation causes the stream pointer to advance after the read data.

Implements org.pdfclown.bytes.IInputStream.

void org.pdfclown.bytes.Stream.Seek | ( | long | position | ) |

Sets the pointer absolute position.

Implements org.pdfclown.bytes.IInputStream.

void org.pdfclown.bytes.Stream.Skip | ( | long | offset | ) |

Sets the pointer relative position.

Implements org.pdfclown.bytes.IInputStream.

byte [] org.pdfclown.bytes.Stream.ToByteArray | ( |  | ) |

Gets the buffer data copied to a newly-allocated byte array.

Implements org.pdfclown.util.IDataWrapper.

void org.pdfclown.bytes.Stream.Write | ( | IInputStream | data | ) |

Writes an IInputStream into the stream.

Parameters:

  | data | IInputStream to write into the stream.

Implements org.pdfclown.bytes.IOutputStream.

References org.pdfclown.bytes.IStream.Length, org.pdfclown.bytes.IInputStream.Position, and org.pdfclown.bytes.IInputStream.Read().

void org.pdfclown.bytes.Stream.Write | ( | string | data | ) |

Writes a string into the stream.

Parameters:

  | data | String to write into the stream.

Implements org.pdfclown.bytes.IOutputStream.

References org.pdfclown.bytes.Stream.Write().

Referenced by org.pdfclown.bytes.Stream.Write().

void org.pdfclown.bytes.Stream.Write | ( | byte[] | data,
|  | int | offset,
|  | int | length |
| ) |  |  |

Writes a byte range into the stream.

Parameters:

  | data | Byte array to write into the stream.
  | offset | Location in the byte array at which writing begins.
  | length | Number of bytes to write.

Implements org.pdfclown.bytes.IOutputStream.

void org.pdfclown.bytes.Stream.Write | ( | byte[] | data | ) |

Writes a byte array into the stream.

Parameters:

  | data | Byte array to write into the stream.

Implements org.pdfclown.bytes.IOutputStream.

## Property Documentation

ByteOrderEnum org.pdfclown.bytes.Stream.ByteOrder`[get, set]`

Gets/Sets the byte order.

Implements org.pdfclown.bytes.IInputStream.

long org.pdfclown.bytes.Stream.Length`[get]`

Gets the length of the stream.

Implements org.pdfclown.bytes.IStream.

long org.pdfclown.bytes.Stream.Position`[get, set]`

Gets/Sets the pointer position.

Implements org.pdfclown.bytes.IInputStream.

Copyright 2006-2013 Stefano Chizzolini. For more information, please visit PDF Clown home page.