Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef TAGLIB_BYTEVECTORSTREAM_H
00027 #define TAGLIB_BYTEVECTORSTREAM_H
00028
00029 #include "taglib_export.h"
00030 #include "taglib.h"
00031 #include "tbytevector.h"
00032 #include "tiostream.h"
00033
00034 namespace TagLib {
00035
00036 class String;
00037 class Tag;
00038 class AudioProperties;
00039
00041
00042 class TAGLIB_EXPORT ByteVectorStream : public IOStream
00043 {
00044 public:
00049 ByteVectorStream(const ByteVector &data);
00050
00054 virtual ~ByteVectorStream();
00055
00059 FileName name() const;
00060
00064 ByteVector readBlock(unsigned long length);
00065
00075 void writeBlock(const ByteVector &data);
00076
00084 void insert(const ByteVector &data, unsigned long start = 0, unsigned long replace = 0);
00085
00093 void removeBlock(unsigned long start = 0, unsigned long length = 0);
00094
00098 bool readOnly() const;
00099
00104 bool isOpen() const;
00105
00112 void seek(long offset, Position p = Beginning);
00113
00117 void clear();
00118
00122 long tell() const;
00123
00127 long length();
00128
00132 void truncate(long length);
00133
00134 ByteVector *data();
00135
00136 protected:
00137
00138 private:
00139 class ByteVectorStreamPrivate;
00140 ByteVectorStreamPrivate *d;
00141 };
00142
00143 }
00144
00145 #endif