MCPcopy Create free account
hub / github.com/ZeppelinMC/Zeppelin / ByteArray

Method ByteArray

protocol/net/io/encoding/writer.go:171–178  ·  view source on GitHub ↗

Length prefixed byte array

(s []byte)

Source from the content-addressed store, hash-verified

169
170// Length prefixed byte array
171func (w Writer) ByteArray(s []byte) error {
172 if err := w.VarInt(int32(len(s))); err != nil {
173 return err
174 }
175 _, err := w.w.Write(s)
176
177 return err
178}
179
180func (w Writer) FixedByteArray(s []byte) error {
181 _, err := w.w.Write(s)

Callers 1

JSONTextComponentMethod · 0.95

Calls 2

VarIntMethod · 0.95
WriteMethod · 0.45

Tested by

no test coverage detected