mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8326096: Deprecate getTotalIn, getTotalOut methods of java.util.zip.Inflater, java.util.zip.Deflater
Co-authored-by: Jaikiran Pai <jpai@openjdk.org> Reviewed-by: lancea, alanb
This commit is contained in:
parent
c65da92a80
commit
d0d4912c3b
2 changed files with 28 additions and 12 deletions
|
@ -822,12 +822,16 @@ public class Deflater {
|
|||
/**
|
||||
* Returns the total number of uncompressed bytes input so far.
|
||||
*
|
||||
* <p>Since the number of bytes may be greater than
|
||||
* Integer.MAX_VALUE, the {@link #getBytesRead()} method is now
|
||||
* the preferred means of obtaining this information.</p>
|
||||
* @implSpec
|
||||
* This method returns the equivalent of {@code (int) getBytesRead()}
|
||||
* and therefore cannot return the correct value when it is greater
|
||||
* than {@link Integer#MAX_VALUE}.
|
||||
*
|
||||
* @deprecated Use {@link #getBytesRead()} instead
|
||||
*
|
||||
* @return the total number of uncompressed bytes input so far
|
||||
*/
|
||||
@Deprecated(since = "23")
|
||||
public int getTotalIn() {
|
||||
return (int) getBytesRead();
|
||||
}
|
||||
|
@ -848,12 +852,16 @@ public class Deflater {
|
|||
/**
|
||||
* Returns the total number of compressed bytes output so far.
|
||||
*
|
||||
* <p>Since the number of bytes may be greater than
|
||||
* Integer.MAX_VALUE, the {@link #getBytesWritten()} method is now
|
||||
* the preferred means of obtaining this information.</p>
|
||||
* @implSpec
|
||||
* This method returns the equivalent of {@code (int) getBytesWritten()}
|
||||
* and therefore cannot return the correct value when it is greater
|
||||
* than {@link Integer#MAX_VALUE}.
|
||||
*
|
||||
* @deprecated Use {@link #getBytesWritten()} instead
|
||||
*
|
||||
* @return the total number of compressed bytes output so far
|
||||
*/
|
||||
@Deprecated(since = "23")
|
||||
public int getTotalOut() {
|
||||
return (int) getBytesWritten();
|
||||
}
|
||||
|
|
|
@ -643,12 +643,16 @@ public class Inflater {
|
|||
/**
|
||||
* Returns the total number of compressed bytes input so far.
|
||||
*
|
||||
* <p>Since the number of bytes may be greater than
|
||||
* Integer.MAX_VALUE, the {@link #getBytesRead()} method is now
|
||||
* the preferred means of obtaining this information.</p>
|
||||
* @implSpec
|
||||
* This method returns the equivalent of {@code (int) getBytesRead()}
|
||||
* and therefore cannot return the correct value when it is greater
|
||||
* than {@link Integer#MAX_VALUE}.
|
||||
*
|
||||
* @deprecated Use {@link #getBytesRead()} instead
|
||||
*
|
||||
* @return the total number of compressed bytes input so far
|
||||
*/
|
||||
@Deprecated(since = "23")
|
||||
public int getTotalIn() {
|
||||
return (int) getBytesRead();
|
||||
}
|
||||
|
@ -669,12 +673,16 @@ public class Inflater {
|
|||
/**
|
||||
* Returns the total number of uncompressed bytes output so far.
|
||||
*
|
||||
* <p>Since the number of bytes may be greater than
|
||||
* Integer.MAX_VALUE, the {@link #getBytesWritten()} method is now
|
||||
* the preferred means of obtaining this information.</p>
|
||||
* @implSpec
|
||||
* This method returns the equivalent of {@code (int) getBytesWritten()}
|
||||
* and therefore cannot return the correct value when it is greater
|
||||
* than {@link Integer#MAX_VALUE}.
|
||||
*
|
||||
* @deprecated Use {@link #getBytesWritten()} instead
|
||||
*
|
||||
* @return the total number of uncompressed bytes output so far
|
||||
*/
|
||||
@Deprecated(since = "23")
|
||||
public int getTotalOut() {
|
||||
return (int) getBytesWritten();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue