21
21
import static java .lang .Math .max ;
22
22
import static java .lang .Math .min ;
23
23
24
- import com .google .common .annotations .Beta ;
25
24
import com .google .common .annotations .GwtIncompatible ;
26
25
import com .google .common .annotations .J2ktIncompatible ;
27
26
import com .google .common .math .IntMath ;
@@ -285,7 +284,6 @@ static byte[] toByteArray(InputStream in, long expectedSize) throws IOException
285
284
* @since 20.0
286
285
*/
287
286
@ CanIgnoreReturnValue
288
- @ Beta
289
287
public static long exhaust (InputStream in ) throws IOException {
290
288
long total = 0 ;
291
289
long read ;
@@ -300,7 +298,6 @@ public static long exhaust(InputStream in) throws IOException {
300
298
* Returns a new {@link ByteArrayDataInput} instance to read from the {@code bytes} array from the
301
299
* beginning.
302
300
*/
303
- @ Beta
304
301
public static ByteArrayDataInput newDataInput (byte [] bytes ) {
305
302
return newDataInput (new ByteArrayInputStream (bytes ));
306
303
}
@@ -312,7 +309,6 @@ public static ByteArrayDataInput newDataInput(byte[] bytes) {
312
309
* @throws IndexOutOfBoundsException if {@code start} is negative or greater than the length of
313
310
* the array
314
311
*/
315
- @ Beta
316
312
public static ByteArrayDataInput newDataInput (byte [] bytes , int start ) {
317
313
checkPositionIndex (start , bytes .length );
318
314
return newDataInput (new ByteArrayInputStream (bytes , start , bytes .length - start ));
@@ -325,7 +321,6 @@ public static ByteArrayDataInput newDataInput(byte[] bytes, int start) {
325
321
*
326
322
* @since 17.0
327
323
*/
328
- @ Beta
329
324
public static ByteArrayDataInput newDataInput (ByteArrayInputStream byteArrayInputStream ) {
330
325
return new ByteArrayDataInputStream (checkNotNull (byteArrayInputStream ));
331
326
}
@@ -477,7 +472,6 @@ public String readUTF() {
477
472
}
478
473
479
474
/** Returns a new {@link ByteArrayDataOutput} instance with a default size. */
480
- @ Beta
481
475
public static ByteArrayDataOutput newDataOutput () {
482
476
return newDataOutput (new ByteArrayOutputStream ());
483
477
}
@@ -488,7 +482,6 @@ public static ByteArrayDataOutput newDataOutput() {
488
482
*
489
483
* @throws IllegalArgumentException if {@code size} is negative
490
484
*/
491
- @ Beta
492
485
public static ByteArrayDataOutput newDataOutput (int size ) {
493
486
// When called at high frequency, boxing size generates too much garbage,
494
487
// so avoid doing that if we can.
@@ -510,7 +503,6 @@ public static ByteArrayDataOutput newDataOutput(int size) {
510
503
*
511
504
* @since 17.0
512
505
*/
513
- @ Beta
514
506
public static ByteArrayDataOutput newDataOutput (ByteArrayOutputStream byteArrayOutputStream ) {
515
507
return new ByteArrayDataOutputStream (checkNotNull (byteArrayOutputStream ));
516
508
}
@@ -687,7 +679,6 @@ public String toString() {
687
679
*
688
680
* @since 14.0 (since 1.0 as com.google.common.io.NullOutputStream)
689
681
*/
690
- @ Beta
691
682
public static OutputStream nullOutputStream () {
692
683
return NULL_OUTPUT_STREAM ;
693
684
}
@@ -700,7 +691,6 @@ public static OutputStream nullOutputStream() {
700
691
* @return a length-limited {@link InputStream}
701
692
* @since 14.0 (since 1.0 as com.google.common.io.LimitInputStream)
702
693
*/
703
- @ Beta
704
694
public static InputStream limit (InputStream in , long limit ) {
705
695
return new LimitedInputStream (in , limit );
706
696
}
@@ -787,7 +777,6 @@ public long skip(long n) throws IOException {
787
777
* @throws EOFException if this stream reaches the end before reading all the bytes.
788
778
* @throws IOException if an I/O error occurs.
789
779
*/
790
- @ Beta
791
780
public static void readFully (InputStream in , byte [] b ) throws IOException {
792
781
readFully (in , b , 0 , b .length );
793
782
}
@@ -804,7 +793,6 @@ public static void readFully(InputStream in, byte[] b) throws IOException {
804
793
* @throws EOFException if this stream reaches the end before reading all the bytes.
805
794
* @throws IOException if an I/O error occurs.
806
795
*/
807
- @ Beta
808
796
public static void readFully (InputStream in , byte [] b , int off , int len ) throws IOException {
809
797
int read = read (in , b , off , len );
810
798
if (read != len ) {
@@ -822,7 +810,6 @@ public static void readFully(InputStream in, byte[] b, int off, int len) throws
822
810
* @throws EOFException if this stream reaches the end before skipping all the bytes
823
811
* @throws IOException if an I/O error occurs, or the stream does not support skipping
824
812
*/
825
- @ Beta
826
813
public static void skipFully (InputStream in , long n ) throws IOException {
827
814
long skipped = skipUpTo (in , n );
828
815
if (skipped < n ) {
@@ -888,7 +875,6 @@ private static long skipSafely(InputStream in, long n) throws IOException {
888
875
* @throws IOException if an I/O error occurs
889
876
* @since 14.0
890
877
*/
891
- @ Beta
892
878
@ CanIgnoreReturnValue // some processors won't return a useful result
893
879
@ ParametricNullness
894
880
public static <T extends @ Nullable Object > T readBytes (
@@ -928,7 +914,6 @@ private static long skipSafely(InputStream in, long n) throws IOException {
928
914
* @throws IndexOutOfBoundsException if {@code off} is negative, if {@code len} is negative, or if
929
915
* {@code off + len} is greater than {@code b.length}
930
916
*/
931
- @ Beta
932
917
@ CanIgnoreReturnValue
933
918
// Sometimes you don't care how many bytes you actually read, I guess.
934
919
// (You know that it's either going to read len bytes or stop at EOF.)
0 commit comments