![JAR search and dependency download from the Maven repository](/logo.png)
com.google.common.io.ByteStreams.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plantuml Show documentation
Show all versions of plantuml Show documentation
PlantUML is a component that allows to quickly write :
* sequence diagram,
* use case diagram,
* class diagram,
* activity diagram,
* component diagram,
* state diagram
* object diagram
???? 4? java/lang/Integer com/google/common/io/ByteStreams
java/lang/Object ()V
$com/google/common/base/Preconditions checkNotNull &(Ljava/lang/Object;)Ljava/lang/Object;
createBuffer ()[B
java/io/InputStream read ([B)I
java/io/OutputStream write ([BII)V " java/nio/channels/FileChannel
! $ % & position ()J
! * + ,
transferTo ,(JJLjava/nio/channels/WritableByteChannel;)J
! . % / "(J)Ljava/nio/channels/FileChannel;
! 1 2 & size
4 5 6 7 8 java/nio/ByteBuffer wrap ([B)Ljava/nio/ByteBuffer; : ; < = %java/nio/channels/ReadableByteChannel (Ljava/nio/ByteBuffer;)I
? @ A B C 'com/google/common/io/Java8Compatibility flip (Ljava/nio/Buffer;)V
4 E F G hasRemaining ()Z I J K = %java/nio/channels/WritableByteChannel
? M N C clear
P Q R
highestOneBit (I)I
T U V W X java/lang/Math max (II)I
T Z [ X min??? ^ _ ` a b java/util/Queue add (Ljava/lang/Object;)Z
d e ([BII)I
g h i combineBuffers (Ljava/util/Queue;I)[B
k l m n X com/google/common/math/IntMath saturatedMultiply
p q ()I s java/lang/OutOfMemoryError u )input is too large to fit in a byte array
r w x (Ljava/lang/String;)V ^ z { G isEmpty ^ } ~ remove ()Ljava/lang/Object; ? [B
? ? ? ? ? java/util/Arrays copyOf ([BI)[B
? ? ? ? ? java/lang/System arraycopy *(Ljava/lang/Object;ILjava/lang/Object;II)V ? java/util/ArrayDeque
? ? ? (I)V
? ? ? toByteArrayInternal +(Ljava/io/InputStream;Ljava/util/Queue;I)[B ? &expectedSize (%s) must be non-negative
? ? ?
checkArgument (ZLjava/lang/String;J)V ??? ? java/lang/StringBuilder
?
? ? ? ? append (J)Ljava/lang/StringBuilder; ? * bytes is too large to fit in a byte array
? ? ? ? -(Ljava/lang/String;)Ljava/lang/StringBuilder;
? ? ? ? toString ()Ljava/lang/String;???????? ? java/io/ByteArrayInputStream
? ? ? ([B)V
? ? ? newDataInput I(Ljava/io/ByteArrayInputStream;)Lcom/google/common/io/ByteArrayDataInput;
? ? X checkPositionIndex
? ? ? 9com/google/common/io/ByteStreams$ByteArrayDataInputStream
? ? ? !(Ljava/io/ByteArrayInputStream;)V ? java/io/ByteArrayOutputStream
?
? ? ?
newDataOutput K(Ljava/io/ByteArrayOutputStream;)Lcom/google/common/io/ByteArrayDataOutput; ? "java/lang/IllegalArgumentException ? Invalid size: %s
? ? ? valueOf (I)Ljava/lang/Integer;
? ? ? ? ? java/lang/String format 9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
? w
? ? ? :com/google/common/io/ByteStreams$ByteArrayDataOutputStream
? ? ? "(Ljava/io/ByteArrayOutputStream;)V ? ? ? NULL_OUTPUT_STREAM Ljava/io/OutputStream; ? 3com/google/common/io/ByteStreams$LimitedInputStream
? ? ? (Ljava/io/InputStream;J)V
? ? ? readFully (Ljava/io/InputStream;[BII)V
? ? (Ljava/io/InputStream;[BII)I ? java/io/EOFException ? $reached end of stream after reading
? ? ? ? (I)Ljava/lang/StringBuilder; ? bytes; ? bytes expected
? w
? ? ? skipUpTo (Ljava/io/InputStream;J)J %reached end of stream after skipping
?
skipSafely
T [ (JJ)J
q available
skip (J)J "com/google/common/io/ByteProcessor processBytes ([BII)Z getResult #java/lang/IndexOutOfBoundsException len (%s) cannot be negative
w
!" checkPositionIndexes (III)V$ "com/google/common/io/ByteStreams$1
# BUFFER_SIZE I
ConstantValue ZERO_COPY_CHUNK_SIZE
MAX_ARRAY_LEN TO_BYTE_ARRAY_DEQUE_SIZE Code LineNumberTable LocalVariableTable this "Lcom/google/common/io/ByteStreams; copy .(Ljava/io/InputStream;Ljava/io/OutputStream;)J r from Ljava/io/InputStream; to buf total J
StackMapTable
Exceptions@ java/io/IOException MethodParameters RuntimeInvisibleAnnotations 8Lcom/google/errorprone/annotations/CanIgnoreReturnValue; Q(Ljava/nio/channels/ReadableByteChannel;Ljava/nio/channels/WritableByteChannel;)J
sourceChannel Ljava/nio/channels/FileChannel; oldPosition copied 'Ljava/nio/channels/ReadableByteChannel; 'Ljava/nio/channels/WritableByteChannel; Ljava/nio/ByteBuffer; off bufSize in bufs Ljava/util/Queue; totalLen initialBufferSize LocalVariableTypeTable Ljava/util/Queue<[B>; Signature /(Ljava/io/InputStream;Ljava/util/Queue<[B>;I)[B bytesToCopy resultOffset result remaining (Ljava/util/Queue<[B>;I)[B toByteArray (Ljava/io/InputStream;)[B (Ljava/io/InputStream;J)[B expectedSize bytes b exhaust (Ljava/io/InputStream;)J -([B)Lcom/google/common/io/ByteArrayDataInput; .([BI)Lcom/google/common/io/ByteArrayDataInput; start byteArrayInputStream Ljava/io/ByteArrayInputStream; ,()Lcom/google/common/io/ByteArrayDataOutput; -(I)Lcom/google/common/io/ByteArrayDataOutput; byteArrayOutputStream Ljava/io/ByteArrayOutputStream; nullOutputStream ()Ljava/io/OutputStream; limit -(Ljava/io/InputStream;J)Ljava/io/InputStream; (Ljava/io/InputStream;[B)V len skipFully n skipped totalSkipped readBytes M(Ljava/io/InputStream;Lcom/google/common/io/ByteProcessor;)Ljava/lang/Object; input processor $Lcom/google/common/io/ByteProcessor; )Lcom/google/common/io/ByteProcessor; Y(Ljava/io/InputStream;Lcom/google/common/io/ByteProcessor;)TT; RuntimeVisibleAnnotations )Lcom/google/common/io/ParametricNullness; RuntimeVisibleTypeAnnotations 5Lorg/checkerframework/checker/nullness/qual/Nullable;
SourceFile ByteStreams.java 6Lcom/google/common/io/ElementTypesAreNonnullByDefault; 0Lcom/google/common/annotations/J2ktIncompatible; /Lcom/google/common/annotations/GwtIncompatible; InnerClasses ByteArrayDataInputStream ByteArrayDataOutputStream LimitedInputStream 1 &' ( ) *' ( + ,' ( \ -' ( . ? ? / ?? 0 A
/ / *? ? 0 a1 23 45 / ? 3*? W+? W? M B*,? 6? ? +,? !?aB???!? 0 . q r
s t v w x z ( { . | 1 }1 4 6' 378 39 ? %: ? #;<