Buffer

Overview

Location

  • Reference:
    • Go.dll  .NET, .NET Standard 2.0
    • Go.fx  Island, macOS
  • Namespace: go.bytes

Implements

Instance Methods


constructor

 

constructor

 

Buffer()

 

init()

constructor (Buffer)

 

constructor(value: Buffer)

 

Buffer(Buffer value)

 

init(_ value: Buffer)

Parameters:

  • value:

Read

 

method Read(p: Slice<Byte>): tuple of (n: Int64, err: error)

 

(Int64 n, error err) Read(Slice<Byte> p)

 

func Read(_ p: Slice<Byte>) -> (n:Int64, err:error)

 

func Read(p Slice<Byte>) (n Int64, err error)

Parameters:

  • p:

Write

 

method Write(p: Slice<Byte>): tuple of (n: Int64, err: error)

 

(Int64 n, error err) Write(Slice<Byte> p)

 

func Write(_ p: Slice<Byte>) -> (n:Int64, err:error)

 

func Write(p Slice<Byte>) (n Int64, err error)

Parameters:

  • p:

Bytes

 

method Bytes: Slice<Byte>

 

Slice<Byte> Bytes()

 

func Bytes() -> Slice<Byte>

 

func Bytes() Slice<Byte>

Cap

 

method Cap: int

 

int Cap()

 

func Cap() -> int

 

func Cap() int

Grow

 

method Grow(n: int)

 

void Grow(int n)

 

func Grow(_ n: int)

 

func Grow(n int)

Parameters:

  • n:

Len

 

method Len: int

 

int Len()

 

func Len() -> int

 

func Len() int

Next

 

method Next(n: int): Slice<Byte>

 

Slice<Byte> Next(int n)

 

func Next(_ n: int) -> Slice<Byte>

 

func Next(n int) Slice<Byte>

Parameters:

  • n:

ReadByte

 

// .NET, Island, macOS
method ReadByte: tuple of (Byte, error)
// .NET Standard 2.0
method ReadByte: ValueTuple<Byte, error>

 

// .NET, Island, macOS
(Byte, error) ReadByte()
// .NET Standard 2.0
ValueTuple<Byte, error> ReadByte()

 

// .NET, Island, macOS
func ReadByte() -> (Byte, error)
// .NET Standard 2.0
func ReadByte() -> ValueTuple<Byte, error>

 

// .NET, Island, macOS
func ReadByte() (Byte, error)
// .NET Standard 2.0
func ReadByte() ValueTuple<Byte, error>

ReadBytes

 

method ReadBytes(delim: byte): tuple of (line: Slice<Byte>, err: error)

 

(Slice<Byte> line, error err) ReadBytes(byte delim)

 

func ReadBytes(_ delim: byte) -> (line:Slice<Byte>, err:error)

 

func ReadBytes(delim byte) (line Slice<Byte>, err error)

Parameters:

  • delim:

ReadFrom

 

method ReadFrom(r: Reader): tuple of (n: int64, err: error)

 

(int64 n, error err) ReadFrom(Reader r)

 

func ReadFrom(_ r: Reader) -> (n:int64, err:error)

 

func ReadFrom(r Reader) (n int64, err error)

Parameters:

  • r:

ReadRune

 

method ReadRune: tuple of (r: rune, size: Int64, err: error)

 

(rune r, Int64 size, error err) ReadRune()

 

func ReadRune() -> (r:rune, size:Int64, err:error)

 

func ReadRune() (r rune, size Int64, err error)

ReadString

 

method ReadString(delim: byte): tuple of (line: String, err: error)

 

(String line, error err) ReadString(byte delim)

 

func ReadString(_ delim: byte) -> (line:String, err:error)

 

func ReadString(delim byte) (line String, err error)

Parameters:

  • delim:

Reset

 

method Reset

 

void Reset()

 

func Reset()

 

func Reset()

String

 

method String: string

 

string String()

 

func String() -> string

 

func String() string

Truncate

 

method Truncate(n: int)

 

void Truncate(int n)

 

func Truncate(_ n: int)

 

func Truncate(n int)

Parameters:

  • n:

UnreadByte

 

method UnreadByte: error

 

error UnreadByte()

 

func UnreadByte() -> error

 

func UnreadByte() error

UnreadRune

 

method UnreadRune: error

 

error UnreadRune()

 

func UnreadRune() -> error

 

func UnreadRune() error

WriteByte

 

method WriteByte(c: byte): error

 

error WriteByte(byte c)

 

func WriteByte(_ c: byte) -> error

 

func WriteByte(c byte) error

Parameters:

  • c:

WriteRune

 

method WriteRune(r: rune): tuple of (n: Int64, err: error)

 

(Int64 n, error err) WriteRune(rune r)

 

func WriteRune(_ r: rune) -> (n:Int64, err:error)

 

func WriteRune(r rune) (n Int64, err error)

Parameters:

  • r:

WriteString

 

method WriteString(s: string): tuple of (n: Int64, err: error)

 

(Int64 n, error err) WriteString(string s)

 

func WriteString(_ s: string) -> (n:Int64, err:error)

 

func WriteString(s string) (n Int64, err error)

Parameters:

  • s:

WriteTo

 

method WriteTo(w: Writer): tuple of (n: int64, err: error)

 

(int64 n, error err) WriteTo(Writer w)

 

func WriteTo(_ w: Writer) -> (n:int64, err:error)

 

func WriteTo(w Writer) (n int64, err error)

Parameters:

  • w: