OpenShot Audio Library | OpenShotAudio: juce_InputStream.h Source File

OpenShot Audio Library | OpenShotAudio 0.3.1

Loading...
Searching...
No Matches
juce_InputStream.h
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2017 - ROLI Ltd.
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
Definition: juce_InputStream.h:37
juce::InputStream::getPosition
virtual int64 getPosition()=0
juce::InputStream::~InputStream
virtual ~InputStream()=default
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::read
virtual int read(void *destBuffer, int maxBytesToRead)=0
juce::MemoryBlock
Definition: juce_MemoryBlock.h:33
juce::String
Definition: juce_String.h:39