bytebuffer
[iotcloud.git] / version2 / src / C / ByteBuffer.h
index a89ca243613ca1cefc6d560adef3b8991232e942..7b8d2e4ed9c71295af4e6761aaedd7cdc6d7e039 100644 (file)
@@ -7,11 +7,20 @@ public:
        void put(char c);
        void putInt(int32_t l);
        void putLong(int64_t l);
-       void put(Array<char> * array);
+       void put(Array<char> *array);
        int64_t getLong();
        int32_t getInt();
        char get();
-       void get(Array<char> * array);
- private:
+       void get(Array<char> *array);
+       void position(int32_t newPosition);
+       Array<char> *array();
+private:
+       ByteBuffer(Array<char> *array);
+       friend ByteBuffer *ByteBuffer_wrap(Array<char> *array);
+       friend ByteBuffer *ByteBuffer_allocate(uint size);
+       Array<char> *buffer;
+       uint offset;
 };
+ByteBuffer *ByteBuffer_wrap(Array<char> *array);
+ByteBuffer *ByteBuffer_allocate(uint size);
 #endif