1 |
/* Inflater.java - Decompress a data stream |
/* Inflater.java - Decompress a data stream |
2 |
Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc. |
Copyright (C) 1999, 2000, 2001, 2003, 2005 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
140 |
/** |
/** |
141 |
* The total number of inflated bytes. |
* The total number of inflated bytes. |
142 |
*/ |
*/ |
143 |
private int totalOut; |
private long totalOut; |
144 |
/** |
/** |
145 |
* The total number of bytes set with setInput(). This is not the |
* The total number of bytes set with setInput(). This is not the |
146 |
* value returned by getTotalIn(), since this also includes the |
* value returned by getTotalIn(), since this also includes the |
147 |
* unprocessed input. |
* unprocessed input. |
148 |
*/ |
*/ |
149 |
private int totalIn; |
private long totalIn; |
150 |
/** |
/** |
151 |
* This variable stores the nowrap flag that was given to the constructor. |
* This variable stores the nowrap flag that was given to the constructor. |
152 |
* True means, that the inflated stream doesn't contain a header nor the |
* True means, that the inflated stream doesn't contain a header nor the |
247 |
* Gets the total number of processed compressed input bytes. |
* Gets the total number of processed compressed input bytes. |
248 |
* @return the total number of bytes of processed input bytes. |
* @return the total number of bytes of processed input bytes. |
249 |
*/ |
*/ |
250 |
|
@Deprecated |
251 |
public int getTotalIn() |
public int getTotalIn() |
252 |
{ |
{ |
253 |
|
return (int) (totalIn - getRemaining()); |
254 |
|
} |
255 |
|
|
256 |
|
/** |
257 |
|
* Gets the total number of processed compressed input bytes. |
258 |
|
* @return the total number of bytes of processed input bytes. |
259 |
|
* @since 1.5 |
260 |
|
*/ |
261 |
|
public long getBytesRead() |
262 |
|
{ |
263 |
return totalIn - getRemaining(); |
return totalIn - getRemaining(); |
264 |
} |
} |
265 |
|
|
267 |
* Gets the total number of output bytes returned by inflate(). |
* Gets the total number of output bytes returned by inflate(). |
268 |
* @return the total number of output bytes. |
* @return the total number of output bytes. |
269 |
*/ |
*/ |
270 |
|
@Deprecated |
271 |
public int getTotalOut() |
public int getTotalOut() |
272 |
{ |
{ |
273 |
|
return (int) totalOut; |
274 |
|
} |
275 |
|
|
276 |
|
/** |
277 |
|
* Gets the total number of output bytes returned by inflate(). |
278 |
|
* @return the total number of output bytes. |
279 |
|
* @since 1.5 |
280 |
|
*/ |
281 |
|
public long getBytesWritten() |
282 |
|
{ |
283 |
return totalOut; |
return totalOut; |
284 |
} |
} |
285 |
|
|