vibe.d beta banner
get vibe.d
0.10.1

Asynchronous I/O that doesn’t get in your way, written in D

StdFileStream.read - multiple declarations

Function StdFileStream.read

Fills the preallocated array 'bytes' with data from the stream.

override ulong read (
  scope ubyte[] dst,
  IOMode mode
) @safe;

final abstract void read (
  scope ubyte[] dst
) @safe;

This function will continue read from the stream until the buffer has been fully filled.

Parameters

NameDescription
dst The buffer into which to write the data that was read
mode Optional reading mode (defaults to IOMode.all).

Return

Returns the number of bytes read. The dst buffer will be filled up to this index. The return value is guaranteed to be dst.length for IOMode.all.

Throws

An exception if the operation reads past the end of the stream

See Also

readOnce, tryRead

Function StdFileStream.read

Fills the preallocated array 'bytes' with data from the stream.

override ulong read (
  scope ubyte[] dst,
  IOMode mode
) @safe;

final abstract void read (
  scope ubyte[] dst
) @safe;

This function will continue read from the stream until the buffer has been fully filled.

Parameters

NameDescription
dst The buffer into which to write the data that was read
mode Optional reading mode (defaults to IOMode.all).

Return

Returns the number of bytes read. The dst buffer will be filled up to this index. The return value is guaranteed to be dst.length for IOMode.all.

Throws

An exception if the operation reads past the end of the stream

See Also

readOnce, tryRead

Alias StdFileStream.read

class StdFileStream
{
  // ...
  alias read = ConnectionStream.read;
  // ...
}
Authors

Sönke Ludwig, Eric Cornelius

Copyright

© 2014 Sönke Ludwig

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.