OpenShot Audio Library | OpenShotAudio: juce_InputStream.h Source File

OpenShot Audio Library | OpenShotAudio 0.4.0 |

Loading...
Searching...
No Matches
juce_InputStream.h
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 The code included in this file is provided under the terms of the ISC license
11 http://www.isc.org/downloads/software-support-policy/isc-license. Permission
12 To use, copy, modify, and/or distribute this software for any purpose with or
13 without fee is hereby granted provided that the above copyright notice and
14 this permission notice appear in all copies.
15
16 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
17 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
18 DISCLAIMED.
19
20 ==============================================================================
21*/
22
23namespace juce
24{
25
26//==============================================================================
36 class JUCE_API InputStream
37{
38public:
40 virtual ~InputStream() = default;
41
42 //==============================================================================
52 virtual int64 getTotalLength() = 0;
53
58 int64 getNumBytesRemaining();
59
61 virtual bool isExhausted() = 0;
62
63 //==============================================================================
78 virtual int read (void* destBuffer, int maxBytesToRead) = 0;
79
80 ssize_t read (void* destBuffer, size_t maxBytesToRead);
81
86 virtual char readByte();
87
93 virtual bool readBool();
94
100 virtual short readShort();
101
107 virtual short readShortBigEndian();
108
118 virtual int readInt();
119
129 virtual int readIntBigEndian();
130
140 virtual int64 readInt64();
141
151 virtual int64 readInt64BigEndian();
152
158 virtual float readFloat();
159
165 virtual float readFloatBigEndian();
166
172 virtual double readDouble();
173
179 virtual double readDoubleBigEndian();
180
186 virtual int readCompressedInt();
187
188 //==============================================================================
197 virtual String readNextLine();
198
206 virtual String readString();
207
213 virtual String readEntireStreamAsString();
214
223 virtual size_t readIntoMemoryBlock (MemoryBlock& destBlock,
224 ssize_t maxNumBytesToRead = -1);
225
226 //==============================================================================
230 virtual int64 getPosition() = 0;
231
244 virtual bool setPosition (int64 newPosition) = 0;
245
253 virtual void skipNextBytes (int64 numBytesToSkip);
254
255
256protected:
257 //==============================================================================
258 InputStream() = default;
259
260private:
261 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (InputStream)
262};
263
264} // namespace juce
juce::InputStream::getPosition
virtual int64 getPosition()=0
juce::InputStream::readInt64
virtual int64 readInt64()
Definition juce_InputStream.cpp:133
juce::InputStream::readIntBigEndian
virtual int readIntBigEndian()
Definition juce_InputStream.cpp:98
juce::InputStream::readFloatBigEndian
virtual float readFloatBigEndian()
Definition juce_InputStream.cpp:161
juce::InputStream::~InputStream
virtual ~InputStream()=default
juce::InputStream::getNumBytesRemaining
int64 getNumBytesRemaining()
Definition juce_InputStream.cpp:26
juce::InputStream::readFloat
virtual float readFloat()
Definition juce_InputStream.cpp:153
juce::InputStream::readCompressedInt
virtual int readCompressedInt()
Definition juce_InputStream.cpp:108
juce::InputStream::setPosition
virtual bool setPosition(int64 newPosition)=0
juce::InputStream::isExhausted
virtual bool isExhausted()=0
juce::InputStream::getTotalLength
virtual int64 getTotalLength()=0
juce::InputStream::readDoubleBigEndian
virtual double readDoubleBigEndian()
Definition juce_InputStream.cpp:175
juce::InputStream::readShort
virtual short readShort()
Definition juce_InputStream.cpp:68
juce::InputStream::readInt64BigEndian
virtual int64 readInt64BigEndian()
Definition juce_InputStream.cpp:143
juce::InputStream::skipNextBytes
virtual void skipNextBytes(int64 numBytesToSkip)
Definition juce_InputStream.cpp:237
juce::InputStream::readBool
virtual bool readBool()
Definition juce_InputStream.cpp:63
juce::InputStream::readShortBigEndian
virtual short readShortBigEndian()
Definition juce_InputStream.cpp:78
juce::InputStream::readIntoMemoryBlock
virtual size_t readIntoMemoryBlock(MemoryBlock &destBlock, ssize_t maxNumBytesToRead=-1)
Definition juce_InputStream.cpp:223
juce::InputStream::read
virtual int read(void *destBuffer, int maxBytesToRead)=0
juce::InputStream::readNextLine
virtual String readNextLine()
Definition juce_InputStream.cpp:196
juce::InputStream::readEntireStreamAsString
virtual String readEntireStreamAsString()
Definition juce_InputStream.cpp:229
juce::InputStream::readInt
virtual int readInt()
Definition juce_InputStream.cpp:88
juce::InputStream::readDouble
virtual double readDouble()
Definition juce_InputStream.cpp:168
juce::InputStream::readString
virtual String readString()
Definition juce_InputStream.cpp:182
juce::InputStream::readByte
virtual char readByte()
Definition juce_InputStream.cpp:56
juce::MemoryBlock
Definition juce_MemoryBlock.h:33
juce::String
Definition juce_String.h:53