Loading...
Searching...
No Matches
mce::io::stream::InputStream Class Referenceabstract
Inheritance diagram for mce::io::stream::InputStream:

## Public Member Functions

virtual size_t | read (void *buffer, size_t size)=0
| Reads from the input stream.
virtual size_t | seek (size_t position)=0
| Changes the current position the stream is reading.
virtual size_t | tell ()=0
virtual size_t | getSize ()=0

## Member Function Documentation

## getSize()

virtual size_t mce::io::stream::InputStream::getSize | ( |  | ) |

pure virtual

Returns
  The size of the stream in bytes

Implemented in mce::io::FileInputStream, mce::io::stream::FileInputStream, and mce::io::stream::MemoryInputStream.

## read()

virtual size_t mce::io::stream::InputStream::read | ( | void * | buffer,
|  | size_t | size )

pure virtual

Reads from the input stream.

Parameters

  buffer | The buffer to read the bytes into
  size | The amount of bytes to read

Returns
  The amount of bytes written

Implemented in mce::io::FileInputStream, mce::io::stream::FileInputStream, and mce::io::stream::MemoryInputStream.

## seek()

virtual size_t mce::io::stream::InputStream::seek | ( | size_t | position | ) |

pure virtual

Changes the current position the stream is reading.

Parameters

  position | The position to seek the input stream to

Returns
  The position the input stream is at now

Implemented in mce::io::FileInputStream, mce::io::stream::FileInputStream, and mce::io::stream::MemoryInputStream.

## tell()

virtual size_t mce::io::stream::InputStream::tell | ( |  | ) |

pure virtual

Returns
  The current position the stream is at

Implemented in mce::io::FileInputStream, mce::io::stream::FileInputStream, and mce::io::stream::MemoryInputStream.

The documentation for this class was generated from the following files:

- Minecraft-Community-Edition/IO/Stream/InputStream.hpp
- Minecraft-Community-Edition/IO/Stream/InputStream.cpp