Documentation ¶
Index ¶
- Constants
- Variables
- func AddPackagePrefixes(prefixes ...string)
- func AllowInt8ToByteCoercion()
- func PreventInt8ToByteCoercion()
- func SetPackagePrefixes(prefixes ...string)
- func Unmarshal(data []byte, v any) error
- func UnmarshalReader(r io.Reader, v any) error
- type Annotation
- type Array
- type Class
- type ClassData
- type ClassDescFlags
- type ClassDescInfo
- type Content
- type Decoder
- type Enum
- type Field
- type InvalidUnmarshalError
- type Object
- type SerialVersionUID
- type TypeCode
- type Value
Constants ¶
View Source
const ( StreamMagic = "\xAC\xED" StreamVersion = int16(5) )
View Source
const ( ScWriteMethod = 0x01 ScBlockData = 0x08 ScSerializable = 0x02 ScExternalizable = 0x04 ScEnum = 0x10 )
Variables ¶
View Source
var ErrNoSuchClass = errors.New("no such class in object")
View Source
var ErrNoSuchField = errors.New("no such field in object")
View Source
var ErrNotSupported = errors.New("not supported")
Functions ¶
func AddPackagePrefixes ¶
func AddPackagePrefixes(prefixes ...string)
func AllowInt8ToByteCoercion ¶
func AllowInt8ToByteCoercion()
func PreventInt8ToByteCoercion ¶
func PreventInt8ToByteCoercion()
func SetPackagePrefixes ¶
func SetPackagePrefixes(prefixes ...string)
Types ¶
type Annotation ¶
type Annotation any
type Class ¶
type Class struct { ClassName string SerialVersionUID SerialVersionUID Info ClassDescInfo }
type ClassDescFlags ¶
type ClassDescFlags byte
func (ClassDescFlags) HasWriteMethod ¶
func (f ClassDescFlags) HasWriteMethod() bool
func (ClassDescFlags) IsSerializable ¶
func (f ClassDescFlags) IsSerializable() bool
type ClassDescInfo ¶
type ClassDescInfo struct { Flags ClassDescFlags Fields []Field ClassAnnotation []Annotation SuperClassDesc *Class }
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
func NewDecoder ¶
func (*Decoder) Decode ¶
Decode parses the first element of a stream of serialized Java objects https://docs.oracle.com/javase/6/docs/platform/serialization/spec/protocol.html
func (*Decoder) DecodeAll ¶
DecodeAll parses serialized Java objects https://docs.oracle.com/javase/6/docs/platform/serialization/spec/protocol.html
type InvalidUnmarshalError ¶
An InvalidUnmarshalError describes an invalid argument passed to Unmarshal. (The argument to Unmarshal must be a non-nil pointer.)
func (*InvalidUnmarshalError) Error ¶
func (e *InvalidUnmarshalError) Error() string
type SerialVersionUID ¶
type SerialVersionUID int64
Click to show internal directories.
Click to hide internal directories.