Module golden_apple::generalized[][src]

Expand description

generalized contains many repetetive and unnecisary functions for reading and writing data. For sake of completion and inclusiveness, all standard types that may be written over the stream, no matter how easy to parse, are included here.

Functions

Woefully unnessicary. Seriously, bools are just 0x00 or 0x01. Side note: this function will always read just a single byte, making half of the return type pointless.

Woefully unnessicary. Seriously, bools are just 0x00 or 0x01.

What’s wrong with you? This isn’t something you should need or use. It’s one byte. It’s not even possible to get an error here.

Either writes 0x00 or 0x01 to the writer. Come on, you don’t need this.

Reads a Java Byte from a list of bytes. Returns the value and number of bytes read.

Uses a Read type to read a Java Byte from the stream.

Returns a Java Byte as an array of bytes.

Writes a Java Byte to a Write type.

Reads a Java Double from a list of bytes. Returns the value and number of bytes read.

Uses a Read type to read a Java Double from the stream.

Returns a Java Double as an array of bytes.

Writes a Java Double to a Write type.

Reads a Java Float from a list of bytes. Returns the value and number of bytes read.

Uses a Read type to read a Java Float from the stream.

Returns a Java Float as an array of bytes.

Writes a Java Float to a Write type.

Reads a Java Int from a list of bytes. Returns the value and number of bytes read.

Uses a Read type to read a Java Int from the stream.

Returns a Java Int as an array of bytes.

Writes a Java Int to a Write type.

Reads a Java Long from a list of bytes. Returns the value and number of bytes read.

Uses a Read type to read a Java Long from the stream.

Returns a Java Long as an array of bytes.

Writes a Java Long to a Write type.

Reads a Java Short from a list of bytes. Returns the value and number of bytes read.

Uses a Read type to read a Java Short from the stream.

Returns a Java Short as an array of bytes.

Writes a Java Short to a Write type.

Reads a String from a series of bytes. This function returns the string without the VarInt length prefix, but does include the size of that VarInt in the final size calculation. The text is not verified to be utf8.

Reads a String from a type implimenting Read. This function returns the string without the VarInt length prefix, and does not verify that the text is utf8.

Converts a String to a VarInt length prefixed series of bytes.

Writes a String to a Write interface.

Reads an unsigned Java Byte from a list of bytes. Returns the value and number of bytes read.

Uses a Read type to read an unsigned Java Byte from the stream.

Returns an unsigned Java Byte as an array of bytes.

Writes an unsigned Java Byte to a Write type.

Reads an unsigned Java Short from a list of bytes. Returns the value and number of bytes read.

Uses a Read type to read an unsigned Java Short from the stream.

Returns an unsigned Java Short as an array of bytes.

Writes an unsigned Java Short to a Write type.