Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
com.google.protobuf.BinaryWriter.UnsafeDirectWriter Class Reference
Inheritance diagram for com.google.protobuf.BinaryWriter.UnsafeDirectWriter:
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 bufferPos ()
 
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 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)
 

Static Private Member Functions

static boolean isSupported ()
 

Private Attributes

ByteBuffer buffer
 
long bufferOffset
 
long limitMinusOne
 
long pos
 

Detailed Description

Writer that uses unsafe operations on a target ByteBuffer.

Definition at line 2534 of file BinaryWriter.java.

Member Function Documentation

◆ bufferPos()

int com.google.protobuf.BinaryWriter.UnsafeDirectWriter.bufferPos ( )
inlineprivate

Definition at line 2604 of file BinaryWriter.java.

◆ bytesWrittenToCurrentBuffer()

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

Definition at line 2584 of file BinaryWriter.java.

◆ getTotalBytesWritten()

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

Definition at line 2580 of file BinaryWriter.java.

◆ isSupported()

static boolean com.google.protobuf.BinaryWriter.UnsafeDirectWriter.isSupported ( )
inlinestaticprivate

Indicates whether the required unsafe operations are supported on this platform.

Definition at line 2546 of file BinaryWriter.java.

◆ nextBuffer() [1/3]

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

Definition at line 2550 of file BinaryWriter.java.

◆ nextBuffer() [2/3]

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

Definition at line 2558 of file BinaryWriter.java.

◆ nextBuffer() [3/3]

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

Definition at line 2554 of file BinaryWriter.java.

◆ spaceLeft()

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

Definition at line 2588 of file BinaryWriter.java.

◆ write() [1/3]

void com.google.protobuf.BinaryWriter.UnsafeDirectWriter.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 2998 of file BinaryWriter.java.

◆ write() [2/3]

void com.google.protobuf.BinaryWriter.UnsafeDirectWriter.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 3003 of file BinaryWriter.java.

◆ write() [3/3]

void com.google.protobuf.BinaryWriter.UnsafeDirectWriter.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 3033 of file BinaryWriter.java.

◆ writeBool()

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

Definition at line 2658 of file BinaryWriter.java.

◆ writeBytes()

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

Definition at line 2675 of file BinaryWriter.java.

◆ writeEndGroup()

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

Definition at line 2728 of file BinaryWriter.java.

◆ writeFixed32()

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

Definition at line 2630 of file BinaryWriter.java.

◆ writeFixed64()

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

Definition at line 2651 of file BinaryWriter.java.

◆ writeGroup() [1/2]

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

Definition at line 2709 of file BinaryWriter.java.

◆ writeGroup() [2/2]

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

Definition at line 2716 of file BinaryWriter.java.

◆ writeInt32()

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

Definition at line 2616 of file BinaryWriter.java.

◆ writeLazy() [1/2]

void com.google.protobuf.BinaryWriter.UnsafeDirectWriter.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 3014 of file BinaryWriter.java.

◆ writeLazy() [2/2]

void com.google.protobuf.BinaryWriter.UnsafeDirectWriter.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 3045 of file BinaryWriter.java.

◆ writeMessage() [1/2]

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

Definition at line 2689 of file BinaryWriter.java.

◆ writeMessage() [2/2]

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

Definition at line 2699 of file BinaryWriter.java.

◆ writeSInt32()

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

Definition at line 2623 of file BinaryWriter.java.

◆ writeSInt64()

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

Definition at line 2644 of file BinaryWriter.java.

◆ writeStartGroup()

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

Definition at line 2723 of file BinaryWriter.java.

◆ writeString()

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

Definition at line 2665 of file BinaryWriter.java.

◆ writeUInt32()

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

Definition at line 2609 of file BinaryWriter.java.

◆ writeUInt64()

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

Definition at line 2637 of file BinaryWriter.java.

◆ writeVarint32FiveBytes()

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

Definition at line 2798 of file BinaryWriter.java.

◆ writeVarint32FourBytes()

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

Definition at line 2791 of file BinaryWriter.java.

◆ writeVarint32OneByte()

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

Definition at line 2776 of file BinaryWriter.java.

◆ writeVarint32ThreeBytes()

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

Definition at line 2785 of file BinaryWriter.java.

◆ writeVarint32TwoBytes()

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

Definition at line 2780 of file BinaryWriter.java.

◆ writeVarint64EightBytes()

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

Definition at line 2891 of file BinaryWriter.java.

◆ writeVarint64FiveBytes()

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

Definition at line 2864 of file BinaryWriter.java.

◆ writeVarint64FourBytes()

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

Definition at line 2857 of file BinaryWriter.java.

◆ writeVarint64NineBytes()

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

Definition at line 2902 of file BinaryWriter.java.

◆ writeVarint64OneByte()

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

Definition at line 2842 of file BinaryWriter.java.

◆ writeVarint64SevenBytes()

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

Definition at line 2881 of file BinaryWriter.java.

◆ writeVarint64SixBytes()

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

Definition at line 2872 of file BinaryWriter.java.

◆ writeVarint64TenBytes()

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

Definition at line 2914 of file BinaryWriter.java.

◆ writeVarint64ThreeBytes()

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

Definition at line 2851 of file BinaryWriter.java.

◆ writeVarint64TwoBytes()

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

Definition at line 2846 of file BinaryWriter.java.

Member Data Documentation

◆ buffer

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

Definition at line 2535 of file BinaryWriter.java.

◆ bufferOffset

long com.google.protobuf.BinaryWriter.UnsafeDirectWriter.bufferOffset
private

Definition at line 2536 of file BinaryWriter.java.

◆ limitMinusOne

long com.google.protobuf.BinaryWriter.UnsafeDirectWriter.limitMinusOne
private

Definition at line 2537 of file BinaryWriter.java.

◆ pos

long com.google.protobuf.BinaryWriter.UnsafeDirectWriter.pos
private

Definition at line 2538 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