class CopyingInputStream
Defined at line 165 of file ../../third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h
A generic traditional input stream interface.
Lots of traditional input streams (e.g. file descriptors, C stdio
streams, and C++ iostreams) expose an interface where every read
involves copying bytes into a buffer. If you want to take such an
interface and make a ZeroCopyInputStream based on it, simply implement
CopyingInputStream and then use CopyingInputStreamAdaptor.
CopyingInputStream implementations should avoid buffering if possible.
CopyingInputStreamAdaptor does its own buffering and will read data
in large blocks.
Public Methods
int Read (void * buffer, int size)
Reads up to "size" bytes into the given buffer. Returns the number of
bytes read. Read() waits until at least one byte is available, or
returns zero if no bytes will ever become available (EOF), or -1 if a
permanent read error occurred.
int Skip (int count)
Skips the next "count" bytes of input. Returns the number of bytes
actually skipped. This will always be exactly equal to "count" unless
EOF was reached or a permanent read error occurred.
The default implementation just repeatedly calls Read() into a scratch
buffer.
void ~CopyingInputStream ()
Defined at line 167 of file ../../third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h