activemq-cpp-3.3.0

src/main/decaf/io/DataInput.h

Go to the documentation of this file.
00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one or more
00003  * contributor license agreements.  See the NOTICE file distributed with
00004  * this work for additional information regarding copyright ownership.
00005  * The ASF licenses this file to You under the Apache License, Version 2.0
00006  * (the "License"); you may not use this file except in compliance with
00007  * the License.  You may obtain a copy of the License at
00008  *
00009  *     http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 #ifndef _DECAF_IO_DATAINPUT_H_
00019 #define _DECAF_IO_DATAINPUT_H_
00020 
00021 #include <decaf/util/Config.h>
00022 
00023 #include <vector>
00024 #include <string>
00025 
00026 #include <decaf/io/IOException.h>
00027 #include <decaf/io/EOFException.h>
00028 #include <decaf/io/UTFDataFormatException.h>
00029 #include <decaf/lang/exceptions/NullPointerException.h>
00030 #include <decaf/lang/exceptions/IndexOutOfBoundsException.h>
00031 
00032 namespace decaf {
00033 namespace io {
00034 
00051     class DECAF_API DataInput {
00052     public:
00053 
00054         virtual ~DataInput() {}
00055 
00065         virtual bool readBoolean() = 0;
00066 
00076         virtual char readByte() = 0;
00077 
00087         virtual unsigned char readUnsignedByte() = 0;
00088 
00099         virtual char readChar() = 0;
00100 
00112         virtual double readDouble() = 0;
00113 
00125         virtual float readFloat() = 0;
00126 
00140         virtual int readInt() = 0;
00141 
00163         virtual long long readLong() = 0;
00164 
00176         virtual short readShort() = 0;
00177 
00190         virtual unsigned short readUnsignedShort() = 0;
00191 
00201         virtual std::string readString() = 0;
00202 
00222         virtual std::string readLine() = 0;
00223 
00239         virtual std::string readUTF() = 0;
00240 
00269         virtual void readFully( unsigned char* buffer, int size ) = 0;
00270 
00302         virtual void readFully( unsigned char* buffer, int size, int offset, int length ) = 0;
00303 
00319         virtual long long skipBytes( long long num ) = 0;
00320 
00321     };
00322 
00323 }}
00324 
00325 #endif /* _DECAF_IO_DATAINPUT_H_ */