javadata

package
v2.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2024 License: Apache-2.0, Apache-2.0 Imports: 4 Imported by: 0

README

javadata

Go library to read data written with java.io.DataOutput

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMalformedInput = fmt.Errorf("malformed input")

ErrMalformedInput returned when malformed input is encountered

Functions

This section is empty.

Types

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

Reader knows how to read java serialized data

func NewReader

func NewReader(r io.Reader) *Reader

NewReader creates a new java data input reader

func (*Reader) ReadBool

func (r *Reader) ReadBool() (bool, error)

ReadBool attempts to reads a bool from the stream

func (*Reader) ReadCharAsRune

func (r *Reader) ReadCharAsRune() (rv rune, err error)

ReadCharAsRune attempts to read a java two byte char and return it as a rune

func (*Reader) ReadInt32

func (r *Reader) ReadInt32() (rv int32, err error)

ReadInt32 attempts to reads a signed 32-bit integer from the stream

func (*Reader) ReadUTF

func (r *Reader) ReadUTF() (string, error)

ReadUTF attempts to reads a UTF-encoded string from the stream this method follows the specific alternate encoding desribed here: https://docs.oracle.com/javase/7/docs/api/java/io/DataInput.html

func (*Reader) ReadUint16

func (r *Reader) ReadUint16() (rv uint16, err error)

ReadUint16 attempts to reads a unsigned 16-bit integer from the stream

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL