Apache Log4cxx Version 1.1.0
Loading...
Searching...
No Matches
log4cxx::helpers::ByteArrayInputStream Class Reference

InputStream implemented on top of a byte array. More...

#include <bytearrayinputstream.h>

Inheritance diagram for log4cxx::helpers::ByteArrayInputStream:
log4cxx::helpers::InputStream log4cxx::helpers::Object

Public Member Functions

 ByteArrayInputStream (const ByteList &bytes)
 Creates a ByteArrayInputStream.
 
virtual ~ByteArrayInputStream ()
 
void close () override
 Closes this file input stream and releases any system resources associated with the stream.
 
int read (ByteBuffer &buf) override
 Reads a sequence of bytes into the given buffer.
 
virtual int read (ByteBuffer &dst)=0
 Reads a sequence of bytes into the given buffer.
 
virtual void close ()=0
 Closes this input stream and releases any system resources associated with the stream.
 
- Public Member Functions inherited from log4cxx::helpers::Object
virtual ~Object ()
 
virtual const helpers::ClassgetClass () const =0
 
virtual bool instanceof (const Class &clazz) const =0
 
virtual const void * cast (const Class &clazz) const =0
 

Additional Inherited Members

- Protected Member Functions inherited from log4cxx::helpers::InputStream
 InputStream ()
 
virtual ~InputStream ()
 

Detailed Description

InputStream implemented on top of a byte array.

Constructor & Destructor Documentation

◆ ByteArrayInputStream()

log4cxx::helpers::ByteArrayInputStream::ByteArrayInputStream ( const ByteList &  bytes)

Creates a ByteArrayInputStream.

Parameters
bytesarray of bytes to copy into stream.

◆ ~ByteArrayInputStream()

virtual log4cxx::helpers::ByteArrayInputStream::~ByteArrayInputStream ( )
virtual

Member Function Documentation

◆ close()

void log4cxx::helpers::ByteArrayInputStream::close ( )
overridevirtual

Closes this file input stream and releases any system resources associated with the stream.

Implements log4cxx::helpers::InputStream.

◆ read()

int log4cxx::helpers::ByteArrayInputStream::read ( ByteBuffer buf)
overridevirtual

Reads a sequence of bytes into the given buffer.

Parameters
bufThe buffer into which bytes are to be transferred.
Returns
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.

Implements log4cxx::helpers::InputStream.


The documentation for this class was generated from the following file: