95 const int numBytes = (
sizeByte & 0x7f);
117 if (
read (
n.asBytes, 8) == 8)
127 if (
read (
n.asBytes, 8) == 8)
135 static_assert (
sizeof (
int32) ==
sizeof (
float),
"Union assumes float has the same size as an int32");
184 if (
c == 0 ||
c ==
'\n')
206 return (
size_t)
mo.writeFromInputStream (*
this, numBytes);
213 return mo.toString();
Holds a resizable array of primitive or copy-by-value objects.
static JUCE_CONSTEXPR uint16 littleEndianShort(const void *bytes) noexcept
Turns 2 bytes into a little-endian integer.
static JUCE_CONSTEXPR uint16 bigEndianShort(const void *bytes) noexcept
Turns 2 bytes into a big-endian integer.
static JUCE_CONSTEXPR uint32 bigEndianInt(const void *bytes) noexcept
Turns 4 bytes into a big-endian integer.
static Type swapIfLittleEndian(Type value) noexcept
Swaps the byte order of a signed or unsigned integer if the CPU is little-endian.
static Type swapIfBigEndian(Type value) noexcept
Swaps the byte order of a signed or unsigned integer if the CPU is big-endian.
static JUCE_CONSTEXPR uint32 littleEndianInt(const void *bytes) noexcept
Turns 4 bytes into a little-endian integer.
A class to hold a resizable block of raw data.
Writes data to an internal memory buffer, which grows as required.
String toUTF8() const
Returns a String created from the (UTF8) data that has been written to the stream.
virtual bool writeByte(char byte)
Writes a single byte to the stream.