|
activemq-cpp-3.3.0
|
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_UTI_ZIP_INFLATER_H_ 00019 #define _DECAF_UTI_ZIP_INFLATER_H_ 00020 00021 #include <decaf/util/Config.h> 00022 00023 #include <decaf/lang/exceptions/NullPointerException.h> 00024 #include <decaf/lang/exceptions/IllegalArgumentException.h> 00025 #include <decaf/lang/exceptions/IllegalStateException.h> 00026 #include <decaf/lang/exceptions/IndexOutOfBoundsException.h> 00027 00028 #include <decaf/util/zip/DataFormatException.h> 00029 00030 #include <vector> 00031 00032 namespace decaf { 00033 namespace util { 00034 namespace zip { 00035 00036 class InflaterData; 00037 00054 class DECAF_API Inflater { 00055 private: 00056 00057 InflaterData* data; 00058 00059 private: 00060 00061 Inflater( const Inflater& ); 00062 Inflater& operator=( const Inflater& ); 00063 00064 public: 00065 00070 Inflater(); 00071 00081 Inflater( bool nowrap ); 00082 00083 virtual ~Inflater(); 00084 00102 void setInput( const unsigned char* buffer, int size, int offset, int length ); 00103 00118 void setInput( const std::vector<unsigned char>& buffer, int offset, int length ); 00119 00129 void setInput( const std::vector<unsigned char>& buffer ); 00130 00137 int getRemaining() const; 00138 00160 void setDictionary( const unsigned char* buffer, int size, int offset, int length ); 00161 00180 void setDictionary( const std::vector<unsigned char>& buffer, int offset, int length ); 00181 00195 void setDictionary( const std::vector<unsigned char>& buffer ); 00196 00201 bool needsInput() const; 00202 00206 bool needsDictionary() const; 00207 00212 void finish(); 00213 00217 bool finished() const; 00218 00239 int inflate( unsigned char* buffer, int size, int offset, int length ); 00240 00258 int inflate( std::vector<unsigned char>& buffer, int offset, int length ); 00259 00272 int inflate( std::vector<unsigned char>& buffer ); 00273 00279 long long getAdler() const; 00280 00286 long long getBytesRead() const; 00287 00293 long long getBytesWritten() const; 00294 00301 void reset(); 00302 00308 void end(); 00309 00310 }; 00311 00312 }}} 00313 00314 #endif /* _DECAF_UTI_ZIP_INFLATER_H_ */