vmutils

package
v0.0.0-...-129b147 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NativeEndian nativeEndian

Functions

func CastBytesToInt32s

func CastBytesToInt32s(s []byte) []int32

func CastBytesToInt8s

func CastBytesToInt8s(s []byte) []int8

func CastBytesToUint32s

func CastBytesToUint32s(s []byte) []uint32

func CastInt8sToBytes

func CastInt8sToBytes(s []int8) []byte

[]int8 <-> []byte

func CastInt8sToUint16s

func CastInt8sToUint16s(s []int8) []uint16

[]int8 <-> []uint16

func CastUint16sToInt8s

func CastUint16sToInt8s(s []uint16) []int8

func DecodeMUTF8

func DecodeMUTF8(bytearr []byte) string

mutf8 -> utf16 -> utf32 -> string see java.io.DataInputStream.readUTF(DataInput)

func DotToSlash

func DotToSlash(name string) string

func IsDir

func IsDir(path string) bool

func IsExists

func IsExists(path string) bool

func IsJModFile

func IsJModFile(name string) bool

func IsJarFile

func IsJarFile(name string) bool

func IsZipFile

func IsZipFile(name string) bool

func SlashToDot

func SlashToDot(name string) string

func UTF16ToUTF8

func UTF16ToUTF8(s []uint16) string

func UTF8ToUTF16

func UTF8ToUTF16(s string) []uint16

Types

type BytesReader

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

func NewBytesReader

func NewBytesReader(data []byte, byteOrder binary.ByteOrder) BytesReader

func (*BytesReader) Position

func (reader *BytesReader) Position() int

func (*BytesReader) ReadBytes

func (reader *BytesReader) ReadBytes(n int) []byte

func (*BytesReader) ReadUint16

func (reader *BytesReader) ReadUint16() uint16

func (*BytesReader) ReadUint32

func (reader *BytesReader) ReadUint32() uint32

func (*BytesReader) ReadUint64

func (reader *BytesReader) ReadUint64() uint64

func (*BytesReader) ReadUint8

func (reader *BytesReader) ReadUint8() uint8

type Dir

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

func NewDir

func NewDir(path string) (*Dir, error)

func (*Dir) AbsPath

func (dir *Dir) AbsPath() string

func (*Dir) ReadFile

func (dir *Dir) ReadFile(filename string) ([]byte, error)

type JModFile

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

func NewJModFile

func NewJModFile(path string) (*JModFile, error)

func OpenJModFile

func OpenJModFile(path string) (*JModFile, error)

func (*JModFile) AbsPath

func (mf *JModFile) AbsPath() string

func (*JModFile) Close

func (mf *JModFile) Close()

func (*JModFile) IsOpen

func (mf *JModFile) IsOpen() bool

func (*JModFile) ListFiles

func (mf *JModFile) ListFiles() []string

func (*JModFile) Open

func (mf *JModFile) Open() error

func (*JModFile) ReadFile

func (mf *JModFile) ReadFile(filename string) ([]byte, error)

type StringBuilder

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

func NewStringBuilder

func NewStringBuilder() *StringBuilder

func (*StringBuilder) Append

func (sb *StringBuilder) Append(ss ...string)

func (*StringBuilder) String

func (sb *StringBuilder) String() string

type ZipFile

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

func NewZipFile

func NewZipFile(path string) (*ZipFile, error)

func OpenZipFile

func OpenZipFile(path string) (*ZipFile, error)

func (*ZipFile) AbsPath

func (zf *ZipFile) AbsPath() string

func (*ZipFile) Close

func (zf *ZipFile) Close() error

func (*ZipFile) HasFile

func (zf *ZipFile) HasFile(filename string) bool

func (*ZipFile) IsOpen

func (zf *ZipFile) IsOpen() bool

func (*ZipFile) Open

func (zf *ZipFile) Open() error

func (*ZipFile) ReadFile

func (zf *ZipFile) ReadFile(filename string) ([]byte, error)

Jump to

Keyboard shortcuts

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