Public Member Functions | Private Member Functions | Private Attributes | List of all members
com.google.protobuf.BinaryWriter.SafeDirectWriter Class Reference
Inheritance diagram for com.google.protobuf.BinaryWriter.SafeDirectWriter:
Inheritance graph
[legend]

Public Member Functions

int getTotalBytesWritten ()
 
void write (byte value)
 
void write (byte[] value, int offset, int length)
 
void write (ByteBuffer value)
 
void writeBool (int fieldNumber, boolean value)
 
void writeBytes (int fieldNumber, ByteString value)
 
void writeEndGroup (int fieldNumber)
 
void writeFixed32 (int fieldNumber, int value)
 
void writeFixed64 (int fieldNumber, long value)
 
void writeGroup (int fieldNumber, Object value) throws IOException
 
void writeGroup (int fieldNumber, Object value, Schema schema) throws IOException
 
void writeInt32 (int fieldNumber, int value)
 
void writeLazy (byte[] value, int offset, int length)
 
void writeLazy (ByteBuffer value)
 
void writeMessage (int fieldNumber, Object value) throws IOException
 
void writeMessage (int fieldNumber, Object value, Schema schema) throws IOException
 
void writeSInt32 (int fieldNumber, int value)
 
void writeSInt64 (int fieldNumber, long value)
 
void writeStartGroup (int fieldNumber)
 
void writeString (int fieldNumber, String value)
 
void writeUInt32 (int fieldNumber, int value)
 
void writeUInt64 (int fieldNumber, long value)
 

Private Member Functions

int bytesWrittenToCurrentBuffer ()
 
void nextBuffer ()
 
void nextBuffer (AllocatedBuffer allocatedBuffer)
 
void nextBuffer (int capacity)
 
int spaceLeft ()
 
void writeVarint32FiveBytes (int value)
 
void writeVarint32FourBytes (int value)
 
void writeVarint32OneByte (int value)
 
void writeVarint32ThreeBytes (int value)
 
void writeVarint32TwoBytes (int value)
 
void writeVarint64EightBytes (long value)
 
void writeVarint64EightBytesWithSign (long value)
 
void writeVarint64FiveBytes (long value)
 
void writeVarint64FourBytes (long value)
 
void writeVarint64NineBytes (long value)
 
void writeVarint64OneByte (long value)
 
void writeVarint64SevenBytes (long value)
 
void writeVarint64SixBytes (long value)
 
void writeVarint64TenBytes (long value)
 
void writeVarint64ThreeBytes (long value)
 
void writeVarint64TwoBytes (long value)
 

Private Attributes

ByteBuffer buffer
 
int limitMinusOne
 
int pos
 

Detailed Description

Writer that uses safe operations on a target ByteBuffer.

Definition at line 1986 of file BinaryWriter.java.

Member Function Documentation

◆ bytesWrittenToCurrentBuffer()

int com.google.protobuf.BinaryWriter.SafeDirectWriter.bytesWrittenToCurrentBuffer ( )
inlineprivate

Definition at line 2031 of file BinaryWriter.java.

◆ getTotalBytesWritten()

int com.google.protobuf.BinaryWriter.SafeDirectWriter.getTotalBytesWritten ( )
inline

Definition at line 2027 of file BinaryWriter.java.

◆ nextBuffer() [1/3]

void com.google.protobuf.BinaryWriter.SafeDirectWriter.nextBuffer ( )
inlineprivate

Definition at line 1996 of file BinaryWriter.java.

◆ nextBuffer() [2/3]

void com.google.protobuf.BinaryWriter.SafeDirectWriter.nextBuffer ( AllocatedBuffer  allocatedBuffer)
inlineprivate

Definition at line 2004 of file BinaryWriter.java.

◆ nextBuffer() [3/3]

void com.google.protobuf.BinaryWriter.SafeDirectWriter.nextBuffer ( int  capacity)
inlineprivate

Definition at line 2000 of file BinaryWriter.java.

◆ spaceLeft()

int com.google.protobuf.BinaryWriter.SafeDirectWriter.spaceLeft ( )
inlineprivate

Definition at line 2035 of file BinaryWriter.java.

◆ write() [1/3]

void com.google.protobuf.BinaryWriter.SafeDirectWriter.write ( byte  value)
inline

Writes a single byte.

Parameters
valuethe byte to be written
Exceptions
IOExceptionthrown if an error occurred while writing

Reimplemented from com.google.protobuf.ByteOutput.

Definition at line 2459 of file BinaryWriter.java.

◆ write() [2/3]

void com.google.protobuf.BinaryWriter.SafeDirectWriter.write ( byte[]  value,
int  offset,
int  length 
)
inline

Writes a sequence of bytes. The ByteOutput must copy

if it will not be processed prior to the return of this method call, since

may be reused/altered by the caller.

NOTE: This method MUST NOT modify the

. Doing so is a programming error and will lead to data corruption which will be difficult to debug.

Parameters
valuethe bytes to be written
offsetthe offset of the start of the writable range
lengththe number of bytes to write starting from
Exceptions
IOExceptionthrown if an error occurred while writing

Reimplemented from com.google.protobuf.ByteOutput.

Definition at line 2464 of file BinaryWriter.java.

◆ write() [3/3]

void com.google.protobuf.BinaryWriter.SafeDirectWriter.write ( ByteBuffer  value)
inline

Writes a sequence of bytes. The ByteOutput must copy

if it will not be processed prior to the return of this method call, since

may be reused/altered by the caller.

NOTE: This method MUST NOT modify the

. Doing so is a programming error and will lead to data corruption which will be difficult to debug.

Parameters
valuethe bytes to be written. Upon returning from this call, the of this buffer will be set to the
limit
Exceptions
IOExceptionthrown if an error occurred while writing

Reimplemented from com.google.protobuf.ByteOutput.

Definition at line 2494 of file BinaryWriter.java.

◆ writeBool()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeBool ( int  fieldNumber,
boolean  value 
)
inline

Definition at line 2101 of file BinaryWriter.java.

◆ writeBytes()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeBytes ( int  fieldNumber,
ByteString  value 
)
inline

Definition at line 2118 of file BinaryWriter.java.

◆ writeEndGroup()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeEndGroup ( int  fieldNumber)
inline

Definition at line 2171 of file BinaryWriter.java.

◆ writeFixed32()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeFixed32 ( int  fieldNumber,
int  value 
)
inline

Definition at line 2073 of file BinaryWriter.java.

◆ writeFixed64()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeFixed64 ( int  fieldNumber,
long  value 
)
inline

Definition at line 2094 of file BinaryWriter.java.

◆ writeGroup() [1/2]

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeGroup ( int  fieldNumber,
Object  value 
) throws IOException
inline

Definition at line 2152 of file BinaryWriter.java.

◆ writeGroup() [2/2]

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeGroup ( int  fieldNumber,
Object  value,
Schema  schema 
) throws IOException
inline

Definition at line 2159 of file BinaryWriter.java.

◆ writeInt32()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeInt32 ( int  fieldNumber,
int  value 
)
inline

Definition at line 2059 of file BinaryWriter.java.

◆ writeLazy() [1/2]

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeLazy ( byte[]  value,
int  offset,
int  length 
)
inline

Writes a sequence of bytes. The ByteOutput is free to retain a reference to the value beyond the scope of this method call (e.g. write later) since it is considered immutable and is guaranteed not to change by the caller.

NOTE: This method MUST NOT modify the

. Doing so is a programming error and will lead to data corruption which will be difficult to debug.

Parameters
valuethe bytes to be written
offsetthe offset of the start of the writable range
lengththe number of bytes to write starting from
Exceptions
IOExceptionthrown if an error occurred while writing

Reimplemented from com.google.protobuf.ByteOutput.

Definition at line 2475 of file BinaryWriter.java.

◆ writeLazy() [2/2]

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeLazy ( ByteBuffer  value)
inline

Writes a sequence of bytes. The ByteOutput is free to retain a reference to the value beyond the scope of this method call (e.g. write later) since it is considered immutable and is guaranteed not to change by the caller.

NOTE: This method MUST NOT modify the

. Doing so is a programming error and will lead to data corruption which will be difficult to debug.

Parameters
valuethe bytes to be written. Upon returning from this call, the of this buffer will be set to the
limit
Exceptions
IOExceptionthrown if an error occurred while writing

Reimplemented from com.google.protobuf.ByteOutput.

Definition at line 2506 of file BinaryWriter.java.

◆ writeMessage() [1/2]

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeMessage ( int  fieldNumber,
Object  value 
) throws IOException
inline

Definition at line 2132 of file BinaryWriter.java.

◆ writeMessage() [2/2]

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeMessage ( int  fieldNumber,
Object  value,
Schema  schema 
) throws IOException
inline

Definition at line 2142 of file BinaryWriter.java.

◆ writeSInt32()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeSInt32 ( int  fieldNumber,
int  value 
)
inline

Definition at line 2066 of file BinaryWriter.java.

◆ writeSInt64()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeSInt64 ( int  fieldNumber,
long  value 
)
inline

Definition at line 2087 of file BinaryWriter.java.

◆ writeStartGroup()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeStartGroup ( int  fieldNumber)
inline

Definition at line 2166 of file BinaryWriter.java.

◆ writeString()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeString ( int  fieldNumber,
String  value 
)
inline

Definition at line 2108 of file BinaryWriter.java.

◆ writeUInt32()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeUInt32 ( int  fieldNumber,
int  value 
)
inline

Definition at line 2052 of file BinaryWriter.java.

◆ writeUInt64()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeUInt64 ( int  fieldNumber,
long  value 
)
inline

Definition at line 2080 of file BinaryWriter.java.

◆ writeVarint32FiveBytes()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeVarint32FiveBytes ( int  value)
inlineprivate

Definition at line 2250 of file BinaryWriter.java.

◆ writeVarint32FourBytes()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeVarint32FourBytes ( int  value)
inlineprivate

Definition at line 2239 of file BinaryWriter.java.

◆ writeVarint32OneByte()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeVarint32OneByte ( int  value)
inlineprivate

Definition at line 2219 of file BinaryWriter.java.

◆ writeVarint32ThreeBytes()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeVarint32ThreeBytes ( int  value)
inlineprivate

Definition at line 2229 of file BinaryWriter.java.

◆ writeVarint32TwoBytes()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeVarint32TwoBytes ( int  value)
inlineprivate

Definition at line 2223 of file BinaryWriter.java.

◆ writeVarint64EightBytes()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeVarint64EightBytes ( long  value)
inlineprivate

Definition at line 2353 of file BinaryWriter.java.

◆ writeVarint64EightBytesWithSign()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeVarint64EightBytesWithSign ( long  value)
inlineprivate

Definition at line 2368 of file BinaryWriter.java.

◆ writeVarint64FiveBytes()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeVarint64FiveBytes ( long  value)
inlineprivate

Definition at line 2314 of file BinaryWriter.java.

◆ writeVarint64FourBytes()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeVarint64FourBytes ( long  value)
inlineprivate

Definition at line 2310 of file BinaryWriter.java.

◆ writeVarint64NineBytes()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeVarint64NineBytes ( long  value)
inlineprivate

Definition at line 2383 of file BinaryWriter.java.

◆ writeVarint64OneByte()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeVarint64OneByte ( long  value)
inlineprivate

Definition at line 2298 of file BinaryWriter.java.

◆ writeVarint64SevenBytes()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeVarint64SevenBytes ( long  value)
inlineprivate

Definition at line 2339 of file BinaryWriter.java.

◆ writeVarint64SixBytes()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeVarint64SixBytes ( long  value)
inlineprivate

Definition at line 2326 of file BinaryWriter.java.

◆ writeVarint64TenBytes()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeVarint64TenBytes ( long  value)
inlineprivate

Definition at line 2388 of file BinaryWriter.java.

◆ writeVarint64ThreeBytes()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeVarint64ThreeBytes ( long  value)
inlineprivate

Definition at line 2306 of file BinaryWriter.java.

◆ writeVarint64TwoBytes()

void com.google.protobuf.BinaryWriter.SafeDirectWriter.writeVarint64TwoBytes ( long  value)
inlineprivate

Definition at line 2302 of file BinaryWriter.java.

Member Data Documentation

◆ buffer

ByteBuffer com.google.protobuf.BinaryWriter.SafeDirectWriter.buffer
private

Definition at line 1987 of file BinaryWriter.java.

◆ limitMinusOne

int com.google.protobuf.BinaryWriter.SafeDirectWriter.limitMinusOne
private

Definition at line 1988 of file BinaryWriter.java.

◆ pos

int com.google.protobuf.BinaryWriter.SafeDirectWriter.pos
private

Definition at line 1989 of file BinaryWriter.java.


The documentation for this class was generated from the following file:
offset
GLintptr offset
Definition: glcorearb.h:2944
position
intern position
Definition: array.c:487
value
GLsizei const GLfloat * value
Definition: glcorearb.h:3093


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:06