82 virtual bool write (
const void* dataToWrite,
83 size_t numberOfBytes) = 0;
90 virtual bool writeByte (
char byte);
97 virtual bool writeBool (
bool boolValue);
104 virtual bool writeShort (
short value);
111 virtual bool writeShortBigEndian (
short value);
117 virtual bool writeInt (
int value);
123 virtual bool writeIntBigEndian (
int value);
129 virtual bool writeInt64 (
int64 value);
135 virtual bool writeInt64BigEndian (
int64 value);
142 virtual bool writeFloat (
float value);
149 virtual bool writeFloatBigEndian (
float value);
156 virtual bool writeDouble (
double value);
163 virtual bool writeDoubleBigEndian (
double value);
168 virtual bool writeRepeatedByte (
uint8 byte,
size_t numTimesToRepeat);
181 virtual bool writeCompressedInt (
int value);
196 virtual bool writeString (
const String& text);
209 virtual bool writeText (
const String& text,
211 bool writeUTF16ByteOrderMark,
212 const char* lineEndings);
228 void setNewLineString (
const String& newLineString);
The base class for streams that write data to some kind of destination.
virtual bool write(const void *dataToWrite, size_t numberOfBytes)=0
Writes a block of data to the stream.
virtual int64 getPosition()=0
Returns the stream's current position.
virtual bool setPosition(int64 newPosition)=0
Tries to move the stream's output position.
virtual void flush()=0
If the stream is using a buffer, this will ensure it gets written out to the destination.
const String & getNewLineString() const noexcept
Returns the current new-line string that was set by setNewLineString().
OutputStream &JUCE_CALLTYPE operator<<(OutputStream &stream, const BigInteger &value)
Writes a BigInteger to an OutputStream as a UTF8 decimal string.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...
unsigned char uint8
A platform-independent 8-bit unsigned integer type.
long long int64
A platform-independent 64-bit integer type.