18#ifndef _DECAF_IO_BYTEARRAYOUTPUTSTREAM_H_
19#define _DECAF_IO_BYTEARRAYOUTPUTSTREAM_H_
31 class DECAF_API ByteArrayOutputStream:
public OutputStream {
37 unsigned char* buffer;
51 ByteArrayOutputStream(
const ByteArrayOutputStream&);
52 ByteArrayOutputStream& operator=(
const ByteArrayOutputStream&);
120 void checkExpandSize(
int needed);
virtual void reset()
Clear current Stream contents.
void writeTo(OutputStream *out) const
Writes the complete contents of this byte array output stream to the specified output stream argument...
virtual std::string toString() const
Converts the bytes in the buffer into a standard C++ string.
long long size() const
Gets the current count of bytes written into this ByteArrayOutputStream.
virtual void doWriteArrayBounded(const unsigned char *buffer, int size, int offset, int length)
ByteArrayOutputStream(int bufferSize)
Creates a ByteArrayOutputStream with an internal buffer allocated with the given size.
virtual void doWriteByte(unsigned char value)
virtual ~ByteArrayOutputStream()
std::pair< unsigned char *, int > toByteArray() const
Creates a newly allocated byte array.
ByteArrayOutputStream()
Default Constructor - uses a default internal buffer of 32 bytes, the size increases as the need for ...
#define DECAF_API
Definition Config.h:29
Definition BlockingByteArrayInputStream.h:25
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition AprPool.h:25