Documentation ¶
Index ¶
- Constants
- func ByteToInt16(buf []byte) (ret int16)
- func ByteToInt16LD(buf []byte) (ret int16)
- func ByteToInt32(buf []byte) (ret int32)
- func ByteToInt32LD(buf []byte) (ret int32)
- func ByteToInt64(buf []byte) (ret int64)
- func ByteToInt64LD(buf []byte) (ret int64)
- func Int16ToByte(v int16) (buf []byte)
- func Int16ToByteLD(v int16) (buf []byte)
- func Int32ToByte(v int32) (buf []byte)
- func Int32ToByteLD(v int32) (buf []byte)
- func Int64ToByte(v int64) (buf []byte)
- func Int64ToByteLD(v int64) (buf []byte)
- func UInt16ToByte(v uint16) (buf []byte)
- func UInt16ToByteLD(v uint16) (buf []byte)
- type Buffer
- type ByteOrder
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func ByteToInt16LD ¶ added in v1.0.16
ByteToInt16LD 小端字节序字节数组转int16
func ByteToInt32LD ¶ added in v1.0.16
ByteToInt32LD 小端字节序字节数组转int32
func ByteToInt64LD ¶ added in v1.0.16
ByteToInt64LD 小端字节序字节数组转int64
func Int16ToByteLD ¶ added in v1.0.16
Int16ToByteLD 小端字节序int16转字节数组
func Int32ToByteLD ¶ added in v1.0.16
Int32ToByteLD 小端字节序int32转字节数组
func Int64ToByteLD ¶ added in v1.0.16
Int64ToByteLD 小端字节序int64转字节数组
func UInt16ToByte ¶ added in v1.0.17
UInt16ToByte 大端字节序uint16转字节数组
func UInt16ToByteLD ¶ added in v1.0.16
UInt16ToByteLD 小端字节序uint16转字节数组
Types ¶
type Buffer ¶ added in v1.0.16
type Buffer interface { ReadInt8() int8 ReadUInt8() uint8 ReadInt8WithIndex(int32) int8 ReadUInt8WithIndex(int32) uint8 ReadInt16() int16 ReadInt16WithIndex(int32) int16 ReadInt32() int32 ReadInt32WithIndex(int32) int32 ReadInt64() int64 ReadInt64WithIndex(int32) int64 ReadBytes() []byte ReadBytesWithOutLength() []byte ReadBytesWithIndex(int32) []byte ReadString(size int32) string ReadStringWithIndex(int32, int32) string ReadStringWithoutSize() string ReadStringWithOutLength() string WriteInt8(v int8) WriteUInt8(v uint8) WriteInt8WithIndex(int32, int8) WriteUInt8WithIndex(int32, uint8) WriteInt16(v int16) WriteInt16WithIndex(int32, int16) WriteUInt16(v uint16) WriteInt32(v int32) WriteInt32WithIndex(int32, int32) WriteInt64(v int64) WriteInt64WithIndex(int32, int64) WriteBytes(v []byte) WriteBytesWithOutLength([]byte) WriteBytesWithIndex(int32, []byte) WriteString(size int32, v string) WriteStringWithoutSize(v string) WriteStringWithIndex(int32, string) ToBytes() []byte GetWriteIndex() int32 GetReadIndex() int32 GetContent() []byte GetBodyContent() []byte }
func CreateBigEndianBuffer ¶ added in v1.0.16
func CreateBigEndianBuffer() Buffer
CreateBigEndianBuffer 创建大端序Buffer
func CreateBuffer ¶ added in v1.0.16
CreateBuffer 指定字节序创建Buffer
func CreateLittleEndianBuffer ¶ added in v1.0.16
func CreateLittleEndianBuffer() Buffer
CreateLittleEndianBuffer 创建小端序Buffer
Click to show internal directories.
Click to hide internal directories.