Documentation ¶
Index ¶
- Variables
- func BytesHashCode(b []byte) int32
- func CheckPositionIndex(index, size int64) int64
- func CheckPositionIndex2(index, size int64, desc string) int64
- func FindCRIterator(b byte) bool
- func FindCRLFIterator(b byte) bool
- func FindLFIterator(b byte) bool
- func FindNotCRIterator(b byte) bool
- func FindNotCRLFIterator(b byte) bool
- func FindNotLFIterator(b byte) bool
- func FindNotNullIterator(b byte) bool
- func FindNotWhiteSpaceIterator(b byte) bool
- func FindNullIterator(b byte) bool
- func FindWhiteSpaceIterator(b byte) bool
- type BasicSliceInput
- func (bt *BasicSliceInput) Available() int32
- func (bt *BasicSliceInput) GetReader() io.Reader
- func (bt *BasicSliceInput) GetRetainedSize() int64
- func (bt *BasicSliceInput) IsReadable() bool
- func (bt *BasicSliceInput) Length() int64
- func (bt *BasicSliceInput) Position() int64
- func (bt *BasicSliceInput) Read(p []byte) (n int, err error)
- func (bt *BasicSliceInput) ReadBS() (byte, error)
- func (bt *BasicSliceInput) ReadBS2(b []byte) (n int, err error)
- func (bt *BasicSliceInput) ReadBS3(destination []byte, destinationIndex int, length int) (n int, err error)
- func (bt *BasicSliceInput) ReadBoolean() bool
- func (bt *BasicSliceInput) ReadByte() byte
- func (bt *BasicSliceInput) ReadBytes2(destination []byte, destinationIndex int32, length int32)
- func (bt *BasicSliceInput) ReadDouble() float64
- func (bt *BasicSliceInput) ReadFloat() float32
- func (bt *BasicSliceInput) ReadInt() int32
- func (bt *BasicSliceInput) ReadLong() int64
- func (bt *BasicSliceInput) ReadOutputStream(out mothio.OutputStream, length int32)
- func (bt *BasicSliceInput) ReadShort() int16
- func (bt *BasicSliceInput) ReadSlice(length int32) *Slice
- func (bt *BasicSliceInput) ReadSlice4(destination *Slice, destinationIndex int32, length int32)
- func (bt *BasicSliceInput) ReadUnsignedByte() uint8
- func (bt *BasicSliceInput) ReadUnsignedShort() uint16
- func (bt *BasicSliceInput) Remaining() int64
- func (bt *BasicSliceInput) SetPosition(position int64)
- func (bt *BasicSliceInput) Skip(length int64) int64
- func (bt *BasicSliceInput) SkipBytes(length int32) int32
- func (bt *BasicSliceInput) Slice() *Slice
- func (bt *BasicSliceInput) String() string
- type ByteIterator
- type DynamicSliceOutput
- func (ct *DynamicSliceOutput) AppendByte(value byte) SliceOutput
- func (ct *DynamicSliceOutput) AppendBytes(source []byte, sourceIndex int32, length int32) SliceOutput
- func (ct *DynamicSliceOutput) AppendBytes2(source []byte) SliceOutput
- func (ct *DynamicSliceOutput) AppendDouble(value float64) SliceOutput
- func (ct *DynamicSliceOutput) AppendInt(value int32) SliceOutput
- func (ct *DynamicSliceOutput) AppendLong(value int64) SliceOutput
- func (ct *DynamicSliceOutput) AppendShort(value int16) SliceOutput
- func (ct *DynamicSliceOutput) AppendSlice(slice *Slice) SliceOutput
- func (ct *DynamicSliceOutput) GetRetainedSize() int64
- func (ct *DynamicSliceOutput) GetUnderlyingSlice() *Slice
- func (ct *DynamicSliceOutput) IsWritable() bool
- func (ct *DynamicSliceOutput) Reset()
- func (ct *DynamicSliceOutput) Reset2(position int32)
- func (ct *DynamicSliceOutput) Size() int32
- func (ct *DynamicSliceOutput) Slice() *Slice
- func (ct *DynamicSliceOutput) String() string
- func (ct *DynamicSliceOutput) ToString() string
- func (ct *DynamicSliceOutput) WritableBytes() int32
- func (ct *DynamicSliceOutput) WriteBS(source []byte) (n int, err error)
- func (ct *DynamicSliceOutput) WriteBS2(b []byte, off int32, len int32) (n int, err error)
- func (ct *DynamicSliceOutput) WriteByte(b byte) error
- func (ct *DynamicSliceOutput) WriteBytes(source []byte)
- func (ct *DynamicSliceOutput) WriteBytes2(source []byte, sourceIndex int32, length int32)
- func (ct *DynamicSliceOutput) WriteDouble(value float64)
- func (ct *DynamicSliceOutput) WriteFloat(value float32)
- func (ct *DynamicSliceOutput) WriteInputStream(input mothio.InputStream, length int32)
- func (ct *DynamicSliceOutput) WriteInt(value int32)
- func (ct *DynamicSliceOutput) WriteLong(value int64)
- func (ct *DynamicSliceOutput) WriteShort(value int16)
- func (ct *DynamicSliceOutput) WriteSlice(source *Slice)
- func (ct *DynamicSliceOutput) WriteSlice2(source *Slice, sourceIndex int32, length int32)
- func (ct *DynamicSliceOutput) WriteZero(length int32)
- type FixedLengthSliceInput
- type OutputStreamSliceOutput
- func (ot *OutputStreamSliceOutput) AppendByte(value byte) SliceOutput
- func (ot *OutputStreamSliceOutput) AppendBytes(source []byte, sourceIndex int32, length int32) SliceOutput
- func (ot *OutputStreamSliceOutput) AppendBytes2(source []byte) SliceOutput
- func (ot *OutputStreamSliceOutput) AppendDouble(value float64) SliceOutput
- func (ot *OutputStreamSliceOutput) AppendInt(value int32) SliceOutput
- func (ot *OutputStreamSliceOutput) AppendLong(value int64) SliceOutput
- func (ot *OutputStreamSliceOutput) AppendShort(value int16) SliceOutput
- func (ot *OutputStreamSliceOutput) AppendSlice(slice *Slice) SliceOutput
- func (ot *OutputStreamSliceOutput) Close() error
- func (ot *OutputStreamSliceOutput) Flush()
- func (ot *OutputStreamSliceOutput) GetRetainedSize() int64
- func (ot *OutputStreamSliceOutput) GetUnderlyingSlice() *Slice
- func (ot *OutputStreamSliceOutput) IsWritable() bool
- func (ot *OutputStreamSliceOutput) LongSize() int64
- func (ot *OutputStreamSliceOutput) Reset()
- func (ot *OutputStreamSliceOutput) Reset2(position int32)
- func (ot *OutputStreamSliceOutput) Size() int32
- func (ot *OutputStreamSliceOutput) Slice() *Slice
- func (ot *OutputStreamSliceOutput) String() string
- func (ot *OutputStreamSliceOutput) ToString() string
- func (ot *OutputStreamSliceOutput) WritableBytes() int32
- func (ot *OutputStreamSliceOutput) WriteB(value byte) (n int, err error)
- func (ot *OutputStreamSliceOutput) WriteBS(source []byte) (n int, err error)
- func (ot *OutputStreamSliceOutput) WriteBS2(source []byte, sourceIndex int32, length int32) (n int, err error)
- func (ot *OutputStreamSliceOutput) WriteBoolean(value bool)
- func (ot *OutputStreamSliceOutput) WriteByte(value byte) error
- func (ot *OutputStreamSliceOutput) WriteBytes(source []byte)
- func (ot *OutputStreamSliceOutput) WriteBytes2(source []byte, sourceIndex int32, length int32)
- func (ot *OutputStreamSliceOutput) WriteChar(value byte)
- func (ot *OutputStreamSliceOutput) WriteChars(s string)
- func (ot *OutputStreamSliceOutput) WriteDouble(value float64)
- func (ot *OutputStreamSliceOutput) WriteFloat(value float32)
- func (ot *OutputStreamSliceOutput) WriteInputStream(in mothio.InputStream, length int32)
- func (ot *OutputStreamSliceOutput) WriteInt(value int32)
- func (ot *OutputStreamSliceOutput) WriteLong(value int64)
- func (ot *OutputStreamSliceOutput) WriteShort(value int16)
- func (ot *OutputStreamSliceOutput) WriteSlice(source *Slice)
- func (ot *OutputStreamSliceOutput) WriteSlice2(source *Slice, sourceIndex int32, length int32)
- func (ot *OutputStreamSliceOutput) WriteString(s string)
- func (ot *OutputStreamSliceOutput) WriteToOutputStream(source []byte, sourceIndex int32, length int32)
- func (ot *OutputStreamSliceOutput) WriteToOutputStream2(source *Slice, sourceIndex int32, length int32)
- func (ot *OutputStreamSliceOutput) WriteZero(length int32)
- type Slice
- func New(size int, bufs ...[]byte) (*Slice, error)
- func NewBaseBuf(buf []byte) *Slice
- func NewByString(s string) (*Slice, error)
- func NewReader(reader io.Reader) (*Slice, error)
- func NewSlice(bufs ...[]byte) (*Slice, error)
- func NewWithBuf(buf []byte) *Slice
- func NewWithSize(size int) *Slice
- func NewWithString(s string) *Slice
- func (b *Slice) AvailableBytes() []byte
- func (b *Slice) Bytes() []byte
- func (b *Slice) Capacity() int
- func (b *Slice) CompareTo(ob *Slice) int
- func (b *Slice) CompareTo2(offset int, length int, ob *Slice, otherOffset int, otherLength int) int
- func (b *Slice) Copy() *Slice
- func (b *Slice) DiscardReadBytes()
- func (b *Slice) EnsureCapacity(size int)
- func (b *Slice) Equal(ob *Slice) bool
- func (b *Slice) Equal2(offset int, ob *Slice, otherOffset int, length int) bool
- func (b *Slice) Flush()
- func (b *Slice) ForEachByte(iterator ByteIterator, indexes ...int) int
- func (b *Slice) ForceRelease()
- func (b *Slice) FromReader(reader io.Reader) error
- func (b *Slice) GetBool(i int) (bool, error)
- func (b *Slice) GetByte(i int) (byte, error)
- func (b *Slice) GetByteInt32(i int32) byte
- func (b *Slice) GetBytes(p []byte, start int, indexes ...int) (int, error)
- func (b *Slice) GetFloat32BE(i int) (float32, error)
- func (b *Slice) GetFloat32LE(i int) (float32, error)
- func (b *Slice) GetFloat64BE(i int) (float64, error)
- func (b *Slice) GetFloat64LE(i int) (float64, error)
- func (b *Slice) GetInput() *BasicSliceInput
- func (b *Slice) GetInt16BE(i int) (int16, error)
- func (b *Slice) GetInt16LE(i int) (int16, error)
- func (b *Slice) GetInt32BE(i int) (int32, error)
- func (b *Slice) GetInt32LE(i int) (int32, error)
- func (b *Slice) GetInt64BE(i int) (int64, error)
- func (b *Slice) GetInt64LE(i int) (int64, error)
- func (b *Slice) GetInt8(i int) (int8, error)
- func (s *Slice) GetRetainedSize() int32
- func (b *Slice) GetUInt16BE(i int) (uint16, error)
- func (b *Slice) GetUInt16LE(i int) (uint16, error)
- func (b *Slice) GetUInt32BE(i int) (uint32, error)
- func (b *Slice) GetUInt32LE(i int) (uint32, error)
- func (b *Slice) GetUInt64BE(i int) (uint64, error)
- func (b *Slice) GetUInt64LE(i int) (uint64, error)
- func (b *Slice) GetUInt8(i int) (uint8, error)
- func (b *Slice) HashCode() int32
- func (b *Slice) HashCodeValue(offset int, length int) int32
- func (b *Slice) Index(p []byte, indexes ...int) int
- func (b *Slice) IsCompact() bool
- func (b *Slice) IsReadable() bool
- func (b *Slice) LenInt64() int64
- func (b *Slice) Length() int32
- func (b *Slice) MakeSlice(index int, length int) (*Slice, error)
- func (b *Slice) MarkReaderIndex()
- func (b *Slice) MarkWriterIndex()
- func (b *Slice) PutBool(i int, val bool) error
- func (b *Slice) PutByte(i int, val byte) error
- func (b *Slice) PutBytes(i int, p []byte) error
- func (b *Slice) PutFloat32BE(i int, val float32) error
- func (b *Slice) PutFloat32LE(i int, val float32) error
- func (b *Slice) PutFloat64BE(i int, val float64) error
- func (b *Slice) PutFloat64LE(i int, val float64) error
- func (b *Slice) PutInt16BE(i int, val int16) error
- func (b *Slice) PutInt16LE(i int, val int16) error
- func (b *Slice) PutInt32BE(i int, val int32) error
- func (b *Slice) PutInt32LE(i int, val int32) error
- func (b *Slice) PutInt64BE(i int, val int64) error
- func (b *Slice) PutInt64LE(i int, val int64) error
- func (b *Slice) PutInt8(i int, val int8) error
- func (b *Slice) PutUInt16BE(i int, val uint16) error
- func (b *Slice) PutUInt16LE(i int, val uint16) error
- func (b *Slice) PutUInt32BE(i int, val uint32) error
- func (b *Slice) PutUInt32LE(i int, val uint32) error
- func (b *Slice) PutUInt64BE(i int, val uint64) error
- func (b *Slice) PutUInt64LE(i int, val uint64) error
- func (b *Slice) PutUInt8(i int, val uint8) error
- func (b *Slice) Read(p []byte) (int, error)
- func (b *Slice) ReadBool() (bool, error)
- func (b *Slice) ReadByte() (byte, error)
- func (b *Slice) ReadBytes(p []byte) (int, error)
- func (b *Slice) ReadFloat32BE() (float32, error)
- func (b *Slice) ReadFloat32LE() (float32, error)
- func (b *Slice) ReadFloat64BE() (float64, error)
- func (b *Slice) ReadFloat64LE() (float64, error)
- func (b *Slice) ReadInt16BE() (int16, error)
- func (b *Slice) ReadInt16LE() (int16, error)
- func (b *Slice) ReadInt32BE() (int32, error)
- func (b *Slice) ReadInt32LE() (int32, error)
- func (b *Slice) ReadInt64BE() (int64, error)
- func (b *Slice) ReadInt64LE() (int64, error)
- func (b *Slice) ReadInt8() (int8, error)
- func (b *Slice) ReadSlice(size int) (*Slice, error)
- func (b *Slice) ReadUInt16BE() (uint16, error)
- func (b *Slice) ReadUInt16LE() (uint16, error)
- func (b *Slice) ReadUInt32BE() (uint32, error)
- func (b *Slice) ReadUInt32LE() (uint32, error)
- func (b *Slice) ReadUInt64BE() (uint64, error)
- func (b *Slice) ReadUInt64LE() (uint64, error)
- func (b *Slice) ReadUInt8() (uint8, error)
- func (b *Slice) ReadableBytes() int
- func (b *Slice) ReaderIndex() int
- func (b *Slice) Ref()
- func (b *Slice) Release()
- func (b *Slice) ResetReaderIndex()
- func (b *Slice) ResetWriterIndex()
- func (b *Slice) Size() int
- func (b *Slice) SizeInt32() int32
- func (b *Slice) Skip(n int) (int, error)
- func (b *Slice) String() string
- func (b *Slice) ToWriter(writer io.Writer) error
- func (b *Slice) UnsafeBytes() []byte
- func (b *Slice) Write(p []byte) (int, error)
- func (b *Slice) WriteBool(val bool) error
- func (b *Slice) WriteByte(val byte) error
- func (b *Slice) WriteBytes(p []byte) error
- func (b *Slice) WriteFloat32BE(val float32) error
- func (b *Slice) WriteFloat32LE(val float32) error
- func (b *Slice) WriteFloat64BE(val float64) error
- func (b *Slice) WriteFloat64LE(val float64) error
- func (b *Slice) WriteInt16BE(val int16) error
- func (b *Slice) WriteInt16LE(val int16) error
- func (b *Slice) WriteInt32BE(val int32) error
- func (b *Slice) WriteInt32LE(val int32) error
- func (b *Slice) WriteInt64BE(val int64) error
- func (b *Slice) WriteInt64LE(val int64) error
- func (b *Slice) WriteInt8(val int8) error
- func (b *Slice) WriteSlice(slice *Slice, offset int, length int) error
- func (b *Slice) WriteUInt16BE(val uint16) error
- func (b *Slice) WriteUInt16LE(val uint16) error
- func (b *Slice) WriteUInt32BE(val uint32) error
- func (b *Slice) WriteUInt32LE(val uint32) error
- func (b *Slice) WriteUInt64BE(val uint64) error
- func (b *Slice) WriteUInt64LE(val uint64) error
- func (b *Slice) WriteUInt8(val uint8) error
- func (b *Slice) WriterIndex() int
- type SliceInput
- type SliceOutput
Constants ¶
This section is empty.
Variables ¶
var ( DEFAULT_BUFFER_SIZE int32 = 4 * 1024 MINIMUM_CHUNK_SIZE int32 = 1024 OUTPUT_INSTANCE_SIZE int32 = util.SizeOf(&OutputStreamSliceOutput{}) )
var ( EMPTY_SLICE = &Slice{buf: make([]byte, 0), capacity: 0, readerMarker: -1, writerMarker: -1} INSTANCE_SIZE = int32(unsafe.Sizeof(EMPTY_SLICE)) SLICE_KIND = reflect.TypeOf(EMPTY_SLICE).Kind() )
var (
BASIC_INSTANCE_SIZE int32 = util.SizeOf(&BasicSliceInput{})
)
var (
// ChunkSize how much byte to allocate if there were not enough room
ChunkSize = 1024
)
Global parameters, users can modify accordingly
var (
DYNAMIC_INSTANCE_SIZE int32 = util.SizeOf(&DynamicSliceOutput{})
)
var (
ErrOutOfBound = errors.New("index is out of bound")
)
Errors
Functions ¶
func BytesHashCode ¶
func CheckPositionIndex ¶
func CheckPositionIndex2 ¶
func FindNotCRLFIterator ¶
FindNotCRLFIterator find till not \r or \n
func FindNotNullIterator ¶
FindNotNullIterator find till not null
func FindNotWhiteSpaceIterator ¶
FindNotWhiteSpaceIterator fdin till \s \t \r\ n
func FindWhiteSpaceIterator ¶
FindWhiteSpaceIterator fdin till \s \t \r\ n
Types ¶
type BasicSliceInput ¶
type BasicSliceInput struct { // 继承 FixedLengthSliceInput // contains filtered or unexported fields }
func final class BasicSliceInput
extends FixedLengthSliceInput
func NewBasicSliceInput ¶
func NewBasicSliceInput(slice *Slice) *BasicSliceInput
func (*BasicSliceInput) GetReader ¶
func (bt *BasicSliceInput) GetReader() io.Reader
func (*BasicSliceInput) GetRetainedSize ¶
func (bt *BasicSliceInput) GetRetainedSize() int64
@Override
func (*BasicSliceInput) ReadBS3 ¶
func (bt *BasicSliceInput) ReadBS3(destination []byte, destinationIndex int, length int) (n int, err error)
@Override
func (*BasicSliceInput) ReadBytes2 ¶
func (bt *BasicSliceInput) ReadBytes2(destination []byte, destinationIndex int32, length int32)
@Override
func (*BasicSliceInput) ReadOutputStream ¶
func (bt *BasicSliceInput) ReadOutputStream(out mothio.OutputStream, length int32)
@Override
func (*BasicSliceInput) ReadSlice ¶
func (bt *BasicSliceInput) ReadSlice(length int32) *Slice
@Override
func (*BasicSliceInput) ReadSlice4 ¶
func (bt *BasicSliceInput) ReadSlice4(destination *Slice, destinationIndex int32, length int32)
@Override
func (*BasicSliceInput) ReadUnsignedByte ¶
func (bt *BasicSliceInput) ReadUnsignedByte() uint8
@Override
func (*BasicSliceInput) ReadUnsignedShort ¶
func (bt *BasicSliceInput) ReadUnsignedShort() uint16
@Override
func (*BasicSliceInput) Remaining ¶
func (bt *BasicSliceInput) Remaining() int64
func (*BasicSliceInput) SetPosition ¶
func (bt *BasicSliceInput) SetPosition(position int64)
@Override
func (*BasicSliceInput) SkipBytes ¶
func (bt *BasicSliceInput) SkipBytes(length int32) int32
@Override
func (*BasicSliceInput) Slice ¶
func (bt *BasicSliceInput) Slice() *Slice
* * Returns a slice of this buffer's readable bytes. Modifying the content * of the returned buffer or this buffer affects each other's content * while they maintain separate indexes and marks. This method is * identical to {@code buf.slice(buf.position(), buf.available()())}. * This method does not modify {@code position} or {@code writerIndex} of * this buffer.
type DynamicSliceOutput ¶
type DynamicSliceOutput struct { // 继承 SliceOutput // contains filtered or unexported fields }
func NewDynamicSliceOutput ¶
func NewDynamicSliceOutput(estimatedSize int32) *DynamicSliceOutput
func (*DynamicSliceOutput) AppendByte ¶
func (ct *DynamicSliceOutput) AppendByte(value byte) SliceOutput
@Override
func (*DynamicSliceOutput) AppendBytes ¶
func (ct *DynamicSliceOutput) AppendBytes(source []byte, sourceIndex int32, length int32) SliceOutput
@Override
func (*DynamicSliceOutput) AppendBytes2 ¶
func (ct *DynamicSliceOutput) AppendBytes2(source []byte) SliceOutput
@Override
func (*DynamicSliceOutput) AppendDouble ¶
func (ct *DynamicSliceOutput) AppendDouble(value float64) SliceOutput
@Override
func (*DynamicSliceOutput) AppendInt ¶
func (ct *DynamicSliceOutput) AppendInt(value int32) SliceOutput
@Override
func (*DynamicSliceOutput) AppendLong ¶
func (ct *DynamicSliceOutput) AppendLong(value int64) SliceOutput
@Override
func (*DynamicSliceOutput) AppendShort ¶
func (ct *DynamicSliceOutput) AppendShort(value int16) SliceOutput
@Override
func (*DynamicSliceOutput) AppendSlice ¶
func (ct *DynamicSliceOutput) AppendSlice(slice *Slice) SliceOutput
@Override
func (*DynamicSliceOutput) GetRetainedSize ¶
func (ct *DynamicSliceOutput) GetRetainedSize() int64
@Override
func (*DynamicSliceOutput) GetUnderlyingSlice ¶
func (ct *DynamicSliceOutput) GetUnderlyingSlice() *Slice
@Override
func (*DynamicSliceOutput) WritableBytes ¶
func (ct *DynamicSliceOutput) WritableBytes() int32
@Override
func (*DynamicSliceOutput) WriteBS ¶
func (ct *DynamicSliceOutput) WriteBS(source []byte) (n int, err error)
func (*DynamicSliceOutput) WriteByte ¶
func (ct *DynamicSliceOutput) WriteByte(b byte) error
@Override
func (*DynamicSliceOutput) WriteBytes ¶
func (ct *DynamicSliceOutput) WriteBytes(source []byte)
@Override
func (*DynamicSliceOutput) WriteBytes2 ¶
func (ct *DynamicSliceOutput) WriteBytes2(source []byte, sourceIndex int32, length int32)
@Override
func (*DynamicSliceOutput) WriteDouble ¶
func (ct *DynamicSliceOutput) WriteDouble(value float64)
@Override
func (*DynamicSliceOutput) WriteFloat ¶
func (ct *DynamicSliceOutput) WriteFloat(value float32)
@Override
func (*DynamicSliceOutput) WriteInputStream ¶
func (ct *DynamicSliceOutput) WriteInputStream(input mothio.InputStream, length int32)
@Override
func (*DynamicSliceOutput) WriteLong ¶
func (ct *DynamicSliceOutput) WriteLong(value int64)
@Override
func (*DynamicSliceOutput) WriteShort ¶
func (ct *DynamicSliceOutput) WriteShort(value int16)
@Override
func (*DynamicSliceOutput) WriteSlice ¶
func (ct *DynamicSliceOutput) WriteSlice(source *Slice)
@Override
func (*DynamicSliceOutput) WriteSlice2 ¶
func (ct *DynamicSliceOutput) WriteSlice2(source *Slice, sourceIndex int32, length int32)
@Override
func (*DynamicSliceOutput) WriteZero ¶
func (ct *DynamicSliceOutput) WriteZero(length int32)
@Override
type FixedLengthSliceInput ¶
type FixedLengthSliceInput interface { // 继承 SliceInput Length() int64 Remaining() int64 }
type OutputStreamSliceOutput ¶
type OutputStreamSliceOutput struct { // 继承 SliceOutput // contains filtered or unexported fields }
func NewOutputStreamSliceOutput ¶
func NewOutputStreamSliceOutput(inputStream mothio.OutputStream) *OutputStreamSliceOutput
func NewOutputStreamSliceOutput2 ¶
func NewOutputStreamSliceOutput2(outputStream mothio.OutputStream, bufferSize int32) *OutputStreamSliceOutput
func (*OutputStreamSliceOutput) AppendByte ¶
func (ot *OutputStreamSliceOutput) AppendByte(value byte) SliceOutput
@Override
func (*OutputStreamSliceOutput) AppendBytes ¶
func (ot *OutputStreamSliceOutput) AppendBytes(source []byte, sourceIndex int32, length int32) SliceOutput
@Override
func (*OutputStreamSliceOutput) AppendBytes2 ¶
func (ot *OutputStreamSliceOutput) AppendBytes2(source []byte) SliceOutput
@Override
func (*OutputStreamSliceOutput) AppendDouble ¶
func (ot *OutputStreamSliceOutput) AppendDouble(value float64) SliceOutput
@Override
func (*OutputStreamSliceOutput) AppendInt ¶
func (ot *OutputStreamSliceOutput) AppendInt(value int32) SliceOutput
@Override
func (*OutputStreamSliceOutput) AppendLong ¶
func (ot *OutputStreamSliceOutput) AppendLong(value int64) SliceOutput
@Override
func (*OutputStreamSliceOutput) AppendShort ¶
func (ot *OutputStreamSliceOutput) AppendShort(value int16) SliceOutput
@Override
func (*OutputStreamSliceOutput) AppendSlice ¶
func (ot *OutputStreamSliceOutput) AppendSlice(slice *Slice) SliceOutput
@Override
func (*OutputStreamSliceOutput) GetRetainedSize ¶
func (ot *OutputStreamSliceOutput) GetRetainedSize() int64
@Override
func (*OutputStreamSliceOutput) GetUnderlyingSlice ¶
func (ot *OutputStreamSliceOutput) GetUnderlyingSlice() *Slice
@Override
func (*OutputStreamSliceOutput) IsWritable ¶
func (ot *OutputStreamSliceOutput) IsWritable() bool
@Override
func (*OutputStreamSliceOutput) LongSize ¶
func (ot *OutputStreamSliceOutput) LongSize() int64
func (*OutputStreamSliceOutput) Reset2 ¶
func (ot *OutputStreamSliceOutput) Reset2(position int32)
@Override
func (*OutputStreamSliceOutput) String ¶
func (ot *OutputStreamSliceOutput) String() string
@Override
func (*OutputStreamSliceOutput) ToString ¶
func (ot *OutputStreamSliceOutput) ToString() string
@Override
func (*OutputStreamSliceOutput) WritableBytes ¶
func (ot *OutputStreamSliceOutput) WritableBytes() int32
@Override
func (*OutputStreamSliceOutput) WriteB ¶
func (ot *OutputStreamSliceOutput) WriteB(value byte) (n int, err error)
@Override
func (*OutputStreamSliceOutput) WriteBS ¶
func (ot *OutputStreamSliceOutput) WriteBS(source []byte) (n int, err error)
@Override
func (*OutputStreamSliceOutput) WriteBS2 ¶
func (ot *OutputStreamSliceOutput) WriteBS2(source []byte, sourceIndex int32, length int32) (n int, err error)
@Override
func (*OutputStreamSliceOutput) WriteBoolean ¶
func (ot *OutputStreamSliceOutput) WriteBoolean(value bool)
@Override
func (*OutputStreamSliceOutput) WriteByte ¶
func (ot *OutputStreamSliceOutput) WriteByte(value byte) error
@Override
func (*OutputStreamSliceOutput) WriteBytes ¶
func (ot *OutputStreamSliceOutput) WriteBytes(source []byte)
@Override
func (*OutputStreamSliceOutput) WriteBytes2 ¶
func (ot *OutputStreamSliceOutput) WriteBytes2(source []byte, sourceIndex int32, length int32)
@Override
func (*OutputStreamSliceOutput) WriteChar ¶
func (ot *OutputStreamSliceOutput) WriteChar(value byte)
@Override
func (*OutputStreamSliceOutput) WriteChars ¶
func (ot *OutputStreamSliceOutput) WriteChars(s string)
@Override
func (*OutputStreamSliceOutput) WriteDouble ¶
func (ot *OutputStreamSliceOutput) WriteDouble(value float64)
@Override
func (*OutputStreamSliceOutput) WriteFloat ¶
func (ot *OutputStreamSliceOutput) WriteFloat(value float32)
@Override
func (*OutputStreamSliceOutput) WriteInputStream ¶
func (ot *OutputStreamSliceOutput) WriteInputStream(in mothio.InputStream, length int32)
@Override
func (*OutputStreamSliceOutput) WriteInt ¶
func (ot *OutputStreamSliceOutput) WriteInt(value int32)
@Override
func (*OutputStreamSliceOutput) WriteLong ¶
func (ot *OutputStreamSliceOutput) WriteLong(value int64)
@Override
func (*OutputStreamSliceOutput) WriteShort ¶
func (ot *OutputStreamSliceOutput) WriteShort(value int16)
@Override
func (*OutputStreamSliceOutput) WriteSlice ¶
func (ot *OutputStreamSliceOutput) WriteSlice(source *Slice)
@Override
func (*OutputStreamSliceOutput) WriteSlice2 ¶
func (ot *OutputStreamSliceOutput) WriteSlice2(source *Slice, sourceIndex int32, length int32)
@Override
func (*OutputStreamSliceOutput) WriteString ¶
func (ot *OutputStreamSliceOutput) WriteString(s string)
@Override
func (*OutputStreamSliceOutput) WriteToOutputStream ¶
func (ot *OutputStreamSliceOutput) WriteToOutputStream(source []byte, sourceIndex int32, length int32)
func (*OutputStreamSliceOutput) WriteToOutputStream2 ¶
func (ot *OutputStreamSliceOutput) WriteToOutputStream2(source *Slice, sourceIndex int32, length int32)
func (*OutputStreamSliceOutput) WriteZero ¶
func (ot *OutputStreamSliceOutput) WriteZero(length int32)
@Override
type Slice ¶
type Slice struct {
// contains filtered or unexported fields
}
Slice Slice itself
func NewByString ¶
func NewSlice ¶
NewSlice create new Slice, pass any []byte in as initial buffer, it will be auto capped
func NewWithSize ¶
func NewWithString ¶
func (*Slice) AvailableBytes ¶
AvailableBytes get available bytes([:size])
func (*Slice) CompareTo2 ¶
func (*Slice) DiscardReadBytes ¶
func (b *Slice) DiscardReadBytes()
DiscardReadBytes discard bytes that are read, adjust readerIndex/writerIndex accordingly
func (*Slice) EnsureCapacity ¶
EnsureCapacity allocate more bytes to ensure the capacity
func (*Slice) Equal ¶
Equal if current Slice is equal to another Slice, compared by underlying byte slice
func (*Slice) Equal2 ¶
Equal if current Slice is equal to another Slice, compared by underlying byte slice
func (*Slice) ForEachByte ¶
func (b *Slice) ForEachByte(iterator ByteIterator, indexes ...int) int
ForEachByte iterate through readable bytes, ForEachByte(iterator, start), ForEachByte(iterator, start, end)
func (*Slice) FromReader ¶
ReadFrom read from io.reader
func (*Slice) GetByteInt32 ¶
GetByte get a byte at given position
func (*Slice) GetBytes ¶
GetBytes get bytes at given position, GetBytes(p, start), GetBytes(p, start, end)
func (*Slice) GetFloat32BE ¶
GetFloat32BE get a float32 in big endian at given position
func (*Slice) GetFloat32LE ¶
GetFloat32LE get a float32 in little endian at given position
func (*Slice) GetFloat64BE ¶
GetFloat64BE get a float64 in big endian at given position
func (*Slice) GetFloat64LE ¶
GetFloat64LE get a float64 in little endian at given position
func (*Slice) GetInput ¶
func (b *Slice) GetInput() *BasicSliceInput
func (*Slice) GetInt16BE ¶
GetInt16BE get an int16 in big endian at given position
func (*Slice) GetInt16LE ¶
GetInt16LE get an int16 in little endian at given position
func (*Slice) GetInt32BE ¶
GetInt32BE get an int32 in big endian at given position
func (*Slice) GetInt32LE ¶
GetInt32LE get an int32 in little endian at given position
func (*Slice) GetInt64BE ¶
GetInt64BE get a int64 in big endian at given position
func (*Slice) GetInt64LE ¶
GetInt64LE get a int64 in little endian at given position
func (*Slice) GetRetainedSize ¶
func (*Slice) GetUInt16BE ¶
GetUInt16BE get an uint16 in big endian at given position
func (*Slice) GetUInt16LE ¶
GetUInt16LE get an uint16 in little endian at given position
func (*Slice) GetUInt32BE ¶
GetUInt32BE get an uint32 in big endian at given position
func (*Slice) GetUInt32LE ¶
GetUInt32LE get an uint32 in little endian at given position
func (*Slice) GetUInt64BE ¶
GetUInt64BE get an uint64 in big endian at given position
func (*Slice) GetUInt64LE ¶
GetUInt64LE get an uint64 in little endian at given position
func (*Slice) Index ¶
Index index a byte slice inside buffer, Index(p), Index(p, start), Index(p, start, end)
func (*Slice) IsReadable ¶
IsReadable if buf is readable (b.writerIndex > b.readerIndex)
func (*Slice) MarkReaderIndex ¶
func (b *Slice) MarkReaderIndex()
MarkReaderIndex mark current reader index for reset in the future
func (*Slice) MarkWriterIndex ¶
func (b *Slice) MarkWriterIndex()
MarkWriterIndex mark current writer index for reset in the future
func (*Slice) PutFloat32BE ¶
PutFloat32BE put a float32 at given position in big endian
func (*Slice) PutFloat32LE ¶
PutFloat32LE put a float32 at given position in little endian
func (*Slice) PutFloat64BE ¶
PutFloat64BE put a float64 at given position in big endian
func (*Slice) PutFloat64LE ¶
PutFloat64LE put a float64 at given position in little endian
func (*Slice) PutInt16BE ¶
PutInt16BE put an int16 at given position in big endian
func (*Slice) PutInt16LE ¶
PutInt16LE put an int16 at given position in little endian
func (*Slice) PutInt32BE ¶
PutInt32BE put an int32 at given position in big endian
func (*Slice) PutInt32LE ¶
PutInt32LE put an int32 at given position in little endian
func (*Slice) PutInt64BE ¶
PutInt64BE put an int64 at given position in big endian
func (*Slice) PutInt64LE ¶
PutInt64LE put an int64 at given position in little endian
func (*Slice) PutUInt16BE ¶
PutUInt16BE put an uint16 at given position in big endian
func (*Slice) PutUInt16LE ¶
PutUInt16LE put an uint16 at given position in little endian
func (*Slice) PutUInt32BE ¶
PutUInt32BE put an uint32 at given position in big endian
func (*Slice) PutUInt32LE ¶
PutUInt32LE put an uint32 at given position in little endian
func (*Slice) PutUInt64BE ¶
PutUInt64BE put an uint64 at given position in big endian
func (*Slice) PutUInt64LE ¶
PutUInt64LE put an uint64 at given position in little endian
func (*Slice) ReadFloat32BE ¶
ReadFloat32BE read a float32 in big endian
func (*Slice) ReadFloat32LE ¶
ReadFloat32LE read a float32 in little endian
func (*Slice) ReadFloat64BE ¶
ReadFloat64BE read a float64 in big endian
func (*Slice) ReadFloat64LE ¶
ReadFloat64LE read a float64 in little endian
func (*Slice) ReadInt16BE ¶
ReadInt16BE read an int16 in big endian
func (*Slice) ReadInt16LE ¶
ReadInt16LE read an int16 in little endian
func (*Slice) ReadInt32BE ¶
ReadInt32BE read an int32 in big endian
func (*Slice) ReadInt32LE ¶
ReadInt32LE read an int32 in little endian
func (*Slice) ReadInt64BE ¶
ReadInt64BE read an int64 in big endian
func (*Slice) ReadInt64LE ¶
ReadInt64LE read an int64 in little endian
func (*Slice) ReadUInt16BE ¶
ReadUInt16BE read a uint16 in big endian
func (*Slice) ReadUInt16LE ¶
ReadUInt16LE read a uint16 in little endian
func (*Slice) ReadUInt32BE ¶
ReadUInt32BE read a uint32 in big endian
func (*Slice) ReadUInt32LE ¶
ReadUInt32LE read a uint32 in little endian
func (*Slice) ReadUInt64BE ¶
ReadUInt64BE read a uint64 in big endian
func (*Slice) ReadUInt64LE ¶
ReadUInt64LE read a uint64 in little endian
func (*Slice) ReadableBytes ¶
ReadableBytes how much bytes are there to be read
func (*Slice) ReaderIndex ¶
ReaderIndex access current reader index
func (*Slice) Release ¶
func (b *Slice) Release()
Release decrement reference counter, underlying buf will be cleared once reference count is 0
func (*Slice) ResetReaderIndex ¶
func (b *Slice) ResetReaderIndex()
ResetReaderIndex reset reader index to marked index
func (*Slice) ResetWriterIndex ¶
func (b *Slice) ResetWriterIndex()
ResetWriterIndex reset writer index to marked index
func (*Slice) UnsafeBytes ¶
UnsafeBytes DANGER! access underlying buffer directly
func (*Slice) WriteFloat32BE ¶
WriteFloat32BE write a float32 in big endian
func (*Slice) WriteFloat32LE ¶
WriteFloat32LE write a float32 in little endian
func (*Slice) WriteFloat64BE ¶
WriteFloat64BE write a float64 in big endian
func (*Slice) WriteFloat64LE ¶
WriteFloat64LE write a float64 in little endian
func (*Slice) WriteInt16BE ¶
WriteInt16BE write an int16 in big endian
func (*Slice) WriteInt16LE ¶
WriteInt16LE write an int16 in little endian
func (*Slice) WriteInt32BE ¶
WriteInt32BE write an int32 in big endian
func (*Slice) WriteInt32LE ¶
WriteInt32LE write an int32 in little endian
func (*Slice) WriteInt64BE ¶
WriteInt64BE write an int64 in big endian
func (*Slice) WriteInt64LE ¶
WriteInt64LE write an int64 in little endian
func (*Slice) WriteUInt16BE ¶
WriteUInt16BE write an uint16 in big endian
func (*Slice) WriteUInt16LE ¶
WriteUInt16LE write an uint16 in little endian
func (*Slice) WriteUInt32BE ¶
WriteUInt32BE write an uint32 in big endian
func (*Slice) WriteUInt32LE ¶
WriteUInt32LE write an uint32 in little endian
func (*Slice) WriteUInt64BE ¶
WriteUInt64BE write an uint64 in big endian
func (*Slice) WriteUInt64LE ¶
WriteUInt64LE write an uint64 in little endian
func (*Slice) WriterIndex ¶
WriterIndex access current writer index
type SliceInput ¶
type SliceInput interface { // 继承 mothio.InputStream // 继承 mothio.DataInput /** * Returns the {@code position} of this buffer. */ Position() int64 /** * Sets the {@code position} of this buffer. * * @throws IndexOutOfBoundsException if the specified {@code position} is * less than {@code 0} or * greater than {@code this.writerIndex} */ SetPosition(position int64) /** * Returns {@code true} * if and only if {@code available()} is greater * than {@code 0}. */ IsReadable() bool /** * Returns the number of bytes that can be read without blocking. */ //@Override Available() int32 //@Override ReadBS() (byte, error) /** * Returns true if the byte at the current {@code position} is not {@code 0} and increases * the {@code position} by {@code 1} in this buffer. * * @throws IndexOutOfBoundsException if {@code this.available()} is less than {@code 1} */ //@Override ReadBoolean() bool /** * Gets a byte at the current {@code position} and increases * the {@code position} by {@code 1} in this buffer. * * @throws IndexOutOfBoundsException if {@code this.available()} is less than {@code 1} */ //@Override ReadByte() byte /** * Gets an unsigned byte at the current {@code position} and increases * the {@code position} by {@code 1} in this buffer. * * @throws IndexOutOfBoundsException if {@code this.available()} is less than {@code 1} */ //@Override ReadUnsignedByte() uint8 /** * Gets a 16-bit short integer at the current {@code position} * and increases the {@code position} by {@code 2} in this buffer. * * @throws IndexOutOfBoundsException if {@code this.available()} is less than {@code 2} */ //@Override ReadShort() int16 /** * Gets an unsigned 16-bit short integer at the current {@code position} * and increases the {@code position} by {@code 2} in this buffer. * * @throws IndexOutOfBoundsException if {@code this.available()} is less than {@code 2} */ //@Override ReadUnsignedShort() uint16 /** * Gets a 32-bit integer at the current {@code position} * and increases the {@code position} by {@code 4} in this buffer. * * @throws IndexOutOfBoundsException if {@code this.available()} is less than {@code 4} */ //@Override ReadInt() int32 /** * Gets an unsigned 32-bit integer at the current {@code position} * and increases the {@code position} by {@code 4} in this buffer. * * @throws IndexOutOfBoundsException if {@code this.available()} is less than {@code 4} */ ReadUnsignedInt() int64 /** * Gets a 64-bit long at the current {@code position} * and increases the {@code position} by {@code 8} in this buffer. * * @throws IndexOutOfBoundsException if {@code this.available()} is less than {@code 8} */ //@Override ReadLong() int64 /** * Gets a 32-bit float at the current {@code position} * and increases the {@code position} by {@code 4} in this buffer. * * @throws IndexOutOfBoundsException if {@code this.available()} is less than {@code 4} */ //@Override ReadFloat() float32 /** * Gets a 64-bit double at the current {@code position} * and increases the {@code position} by {@code 8} in this buffer. * * @throws IndexOutOfBoundsException if {@code this.available()} is less than {@code 8} */ //@Override ReadDouble() float64 /** * Returns a new slice of this buffer's sub-region starting at the current * {@code position} and increases the {@code position} by the size * of the new slice (= {@code length}). * * @param length the size of the new slice * @return the newly created slice * @throws IndexOutOfBoundsException if {@code length} is greater than {@code this.available()} */ ReadSlice(length int32) *Slice //@Override ReadFully(destination []byte) //@Override ReadBS2(b []byte) (n int, err error) //@Override ReadBS3(b []byte, off int, l int) (n int, err error) /** * Transfers this buffer's data to the specified destination starting at * the current {@code position} and increases the {@code position} * by the number of the transferred bytes (= {@code dst.length}). * * @throws IndexOutOfBoundsException if {@code dst.length} is greater than {@code this.available()} */ ReadBytes(destination []byte) //@Override ReadFully2(destination []byte, offset int, length int) /** * Transfers this buffer's data to the specified destination starting at * the current {@code position} and increases the {@code position} * by the number of the transferred bytes (= {@code length}). * * @param destinationIndex the first index of the destination * @param length the number of bytes to transfer * @throws IndexOutOfBoundsException if the specified {@code destinationIndex} is less than {@code 0}, * if {@code length} is greater than {@code this.available()}, or * if {@code destinationIndex + length} is greater than {@code destination.length} */ ReadBytes2(destination []byte, destinationIndex int32, length int32) /** * Transfers this buffer's data to the specified destination starting at * the current {@code position} until the destination becomes * non-writable, and increases the {@code position} by the number of the * transferred bytes. This method is basically same with * {@link #readBytes(Slice, int, int)}, except that this method * increases the {@code writerIndex} of the destination by the number of * the transferred bytes while {@link #readBytes(Slice, int, int)} * does not. * * @throws IndexOutOfBoundsException if {@code destination.writableBytes} is greater than * {@code this.available()} */ ReadSlice2(destination *Slice) /** * Transfers this buffer's data to the specified destination starting at * the current {@code position} and increases the {@code position} * by the number of the transferred bytes (= {@code length}). This method * is basically same with {@link #readBytes(Slice, int, int)}, * except that this method increases the {@code writerIndex} of the * destination by the number of the transferred bytes (= {@code length}) * while {@link #readBytes(Slice, int, int)} does not. * * @throws IndexOutOfBoundsException if {@code length} is greater than {@code this.available()} or * if {@code length} is greater than {@code destination.writableBytes} */ ReadSlice3(destination *Slice, length int32) /** * Transfers this buffer's data to the specified destination starting at * the current {@code position} and increases the {@code position} * by the number of the transferred bytes (= {@code length}). * * @param destinationIndex the first index of the destination * @param length the number of bytes to transfer * @throws IndexOutOfBoundsException if the specified {@code destinationIndex} is less than {@code 0}, * if {@code length} is greater than {@code this.available()}, or * if {@code destinationIndex + length} is greater than * {@code destination.capacity} */ ReadSlice4(destination *Slice, destinationIndex int32, length int32) /** * Transfers this buffer's data to the specified stream starting at the * current {@code position}. * * @param length the number of bytes to transfer * @throws IndexOutOfBoundsException if {@code length} is greater than {@code this.available()} * @throws java.io.IOException if the specified stream threw an exception during I/O */ ReadOutputStream(out mothio.OutputStream, length int32) //@Override Skip(length int64) int64 //@Override SkipBytes(length int32) int32 //@Override Close() /** * Approximate number of bytes retained by this instance. */ GetRetainedSize() int64 //@Override Mark(readLimit int32) //@Override Reset() //@Override MarkSupported() bool //@Override ReadChar() int8 //@Override ReadLine() string }
type SliceOutput ¶
type SliceOutput interface { // 继承 mothio.OutputStream // 继承 mothio.DataOutput /** * Resets this stream to the initial position. */ Reset() /** * Resets this stream to the specified position. */ Reset2(position int32) /** * Returns the {@code writerIndex} of this buffer. */ Size() int32 /** * Approximate number of bytes retained by this. */ GetRetainedSize() int64 /** * Returns the number of writable bytes which is equal to * {@code (this.capacity - this.writerIndex)}. */ WritableBytes() int32 /** * Returns {@code true} * if and only if {@code (this.capacity - this.writerIndex)} is greater * than {@code 0}. */ IsWritable() bool //@Override WriteBoolean(value bool) //@Override WriteB(value byte) (n int, err error) /** * Sets the specified byte at the current {@code writerIndex} * and increases the {@code writerIndex} by {@code 1} in this buffer. * The 24 high-order bits of the specified value are ignored. * * @throws IndexOutOfBoundsException if {@code this.writableBytes} is less than {@code 1} */ // @Override WriteByte(value byte) error /** * Sets the specified 16-bit short integer at the current * {@code writerIndex} and increases the {@code writerIndex} by {@code 2} * in this buffer. The 16 high-order bits of the specified value are ignored. * * @throws IndexOutOfBoundsException if {@code this.writableBytes} is less than {@code 2} */ // @Override WriteShort(value int16) /** * Sets the specified 32-bit integer at the current {@code writerIndex} * and increases the {@code writerIndex} by {@code 4} in this buffer. * * @throws IndexOutOfBoundsException if {@code this.writableBytes} is less than {@code 4} */ // @Override WriteInt(value int32) /** * Sets the specified 64-bit long integer at the current * {@code writerIndex} and increases the {@code writerIndex} by {@code 8} * in this buffer. * * @throws IndexOutOfBoundsException if {@code this.writableBytes} is less than {@code 8} */ // @Override WriteLong(value int64) /** * Sets the specified 32-bit float at the current * {@code writerIndex} and increases the {@code writerIndex} by {@code 4} * in this buffer. * * @throws IndexOutOfBoundsException if {@code this.writableBytes} is less than {@code 4} */ // @Override WriteFloat(v float32) /** * Sets the specified 64-bit double at the current * {@code writerIndex} and increases the {@code writerIndex} by {@code 8} * in this buffer. * * @throws IndexOutOfBoundsException if {@code this.writableBytes} is less than {@code 8} */ // @Override WriteDouble(value float64) /** * Transfers the specified source buffer's data to this buffer starting at * the current {@code writerIndex} until the source buffer becomes * unreadable, and increases the {@code writerIndex} by the number of * the transferred bytes. This method is basically same with * {@link #writeBytes(Slice, int, int)}, except that this method * increases the {@code readerIndex} of the source buffer by the number of * the transferred bytes while {@link #writeBytes(Slice, int, int)} * does not. * * @throws IndexOutOfBoundsException if {@code source.readableBytes} is greater than {@code this.writableBytes} */ WriteSlice(source *Slice) WriteSlice2(source *Slice, sourceIndex int32, length int32) //@Override WriteBS(source []byte) (n int, err error) WriteBytes(source []byte) //@Override WriteBS2(source []byte, sourceIndex int32, length int32) (n int, err error) WriteBytes2(source []byte, sourceIndex int32, length int32) /** * Transfers the content of the specified stream to this buffer * starting at the current {@code writerIndex} and increases the * {@code writerIndex} by the number of the transferred bytes. * * @param length the number of bytes to transfer * @throws IndexOutOfBoundsException if {@code length} is greater than {@code this.writableBytes} * @throws java.io.IOException if the specified stream threw an exception during I/O */ WriteInputStream(in mothio.InputStream, length int32) WriteZero(length int32) // abstract Slice() *Slice /** * Returns the raw underlying slice of this output stream. The slice may * be larger than the size of this stream. */ GetUnderlyingSlice() *Slice /** * Decodes this buffer's readable bytes into a string with the specified * character set name. This method is identical to * {@code buf.toString(buf.readerIndex(), buf.readableBytes(), charsetName)}. * This method does not modify {@code readerIndex} or {@code writerIndex} of * this buffer. */ ToString() string AppendLong(value int64) SliceOutput AppendDouble(value float64) SliceOutput AppendInt(value int32) SliceOutput AppendShort(value int16) SliceOutput AppendByte(value byte) SliceOutput AppendBytes(source []byte, sourceIndex int32, length int32) SliceOutput AppendBytes2(source []byte) SliceOutput AppendSlice(slice *Slice) SliceOutput //@Override WriteChar(value byte) //@Override WriteChars(s string) //@Override WriteString(s string) }
abstract