OSDN Git Service

Merged gcj-eclipse branch to trunk.
[pf3gnuchains/gcc-fork.git] / libjava / classpath / java / util / zip / Inflater.java
index f1616d6..509b957 100644 (file)
@@ -140,13 +140,13 @@ public class Inflater
   /**
    * The total number of inflated bytes.
    */
-  private int totalOut;
+  private long totalOut;
   /**
    * The total number of bytes set with setInput().  This is not the
    * value returned by getTotalIn(), since this also includes the 
    * unprocessed input.
    */
-  private int totalIn;
+  private long totalIn;
   /**
    * This variable stores the nowrap flag that was given to the constructor.
    * True means, that the inflated stream doesn't contain a header nor the
@@ -246,8 +246,19 @@ public class Inflater
    * Gets the total number of processed compressed input bytes.
    * @return the total number of bytes of processed input bytes.
    */
+  @Deprecated
   public int getTotalIn()
   {
+    return (int) (totalIn - getRemaining());
+  }
+
+  /**
+   * Gets the total number of processed compressed input bytes.
+   * @return the total number of bytes of processed input bytes.
+   * @since 1.5
+   */
+  public long getBytesRead()
+  {
     return totalIn - getRemaining();
   }
 
@@ -255,8 +266,19 @@ public class Inflater
    * Gets the total number of output bytes returned by inflate().
    * @return the total number of output bytes.
    */
+  @Deprecated
   public int getTotalOut()
   {
+    return (int) totalOut;
+  }
+
+  /**
+   * Gets the total number of output bytes returned by inflate().
+   * @return the total number of output bytes.
+   * @since 1.5
+   */
+  public long getBytesWritten()
+  {
     return totalOut;
   }