final class com.google.common.io.MoreFiles$PathByteSource extends com.google.common.io.ByteSource
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: com.google.common.io.MoreFiles$PathByteSource
super_class: com.google.common.io.ByteSource
{
private static final java.nio.file.LinkOption[] FOLLOW_LINKS;
descriptor: [Ljava/nio/file/LinkOption;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private final java.nio.file.Path path;
descriptor: Ljava/nio/file/Path;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.nio.file.OpenOption[] options;
descriptor: [Ljava/nio/file/OpenOption;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final boolean followLinks;
descriptor: Z
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: iconst_0
anewarray java.nio.file.LinkOption
putstatic com.google.common.io.MoreFiles$PathByteSource.FOLLOW_LINKS:[Ljava/nio/file/LinkOption;
return
LocalVariableTable:
Start End Slot Name Signature
private void <init>(java.nio.file.Path, java.nio.file.OpenOption[]);
descriptor: (Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)V
flags: (0x0082) ACC_PRIVATE, ACC_VARARGS
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial com.google.common.io.ByteSource.<init>:()V
1: aload 0
aload 1
invokestatic com.google.common.base.Preconditions.checkNotNull:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.nio.file.Path
putfield com.google.common.io.MoreFiles$PathByteSource.path:Ljava/nio/file/Path;
2: aload 0
aload 2
invokevirtual java.nio.file.OpenOption[].clone:()Ljava/lang/Object;
checkcast java.nio.file.OpenOption[]
putfield com.google.common.io.MoreFiles$PathByteSource.options:[Ljava/nio/file/OpenOption;
3: aload 0
aload 0
getfield com.google.common.io.MoreFiles$PathByteSource.options:[Ljava/nio/file/OpenOption;
invokestatic com.google.common.io.MoreFiles$PathByteSource.followLinks:([Ljava/nio/file/OpenOption;)Z
putfield com.google.common.io.MoreFiles$PathByteSource.followLinks:Z
4: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lcom/google/common/io/MoreFiles$PathByteSource;
0 5 1 path Ljava/nio/file/Path;
0 5 2 options [Ljava/nio/file/OpenOption;
MethodParameters:
Name Flags
path
options
private static boolean followLinks(java.nio.file.OpenOption[]);
descriptor: ([Ljava/nio/file/OpenOption;)Z
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=5, args_size=1
start local 0 0: aload 0
dup
astore 4
arraylength
istore 3
iconst_0
istore 2
goto 5
StackMap locals: java.nio.file.OpenOption[] top int int java.nio.file.OpenOption[]
StackMap stack:
1: aload 4
iload 2
aaload
astore 1
start local 1 2: aload 1
getstatic java.nio.file.LinkOption.NOFOLLOW_LINKS:Ljava/nio/file/LinkOption;
if_acmpne 4
3: iconst_0
ireturn
end local 1 4: StackMap locals:
StackMap stack:
iinc 2 1
StackMap locals:
StackMap stack:
5: iload 2
iload 3
if_icmplt 1
6: iconst_1
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 options [Ljava/nio/file/OpenOption;
2 4 1 option Ljava/nio/file/OpenOption;
MethodParameters:
Name Flags
options
public java.io.InputStream openStream();
descriptor: ()Ljava/io/InputStream;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield com.google.common.io.MoreFiles$PathByteSource.path:Ljava/nio/file/Path;
aload 0
getfield com.google.common.io.MoreFiles$PathByteSource.options:[Ljava/nio/file/OpenOption;
invokestatic java.nio.file.Files.newInputStream:(Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/io/InputStream;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/google/common/io/MoreFiles$PathByteSource;
Exceptions:
throws java.io.IOException
private java.nio.file.attribute.BasicFileAttributes readAttributes();
descriptor: ()Ljava/nio/file/attribute/BasicFileAttributes;
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=1, args_size=1
start local 0 0: aload 0
getfield com.google.common.io.MoreFiles$PathByteSource.path:Ljava/nio/file/Path;
1: ldc Ljava/nio/file/attribute/BasicFileAttributes;
2: aload 0
getfield com.google.common.io.MoreFiles$PathByteSource.followLinks:Z
ifeq 3
getstatic com.google.common.io.MoreFiles$PathByteSource.FOLLOW_LINKS:[Ljava/nio/file/LinkOption;
goto 4
StackMap locals: com.google.common.io.MoreFiles$PathByteSource
StackMap stack: java.nio.file.Path java.lang.Class
3: iconst_1
anewarray java.nio.file.LinkOption
dup
iconst_0
getstatic java.nio.file.LinkOption.NOFOLLOW_LINKS:Ljava/nio/file/LinkOption;
aastore
4: StackMap locals: com.google.common.io.MoreFiles$PathByteSource
StackMap stack: java.nio.file.Path java.lang.Class java.nio.file.LinkOption[]
invokestatic java.nio.file.Files.readAttributes:(Ljava/nio/file/Path;Ljava/lang/Class;[Ljava/nio/file/LinkOption;)Ljava/nio/file/attribute/BasicFileAttributes;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lcom/google/common/io/MoreFiles$PathByteSource;
Exceptions:
throws java.io.IOException
public com.google.common.base.Optional<java.lang.Long> sizeIfKnown();
descriptor: ()Lcom/google/common/base/Optional;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual com.google.common.io.MoreFiles$PathByteSource.readAttributes:()Ljava/nio/file/attribute/BasicFileAttributes;
astore 1
start local 1 1: goto 4
end local 1 StackMap locals:
StackMap stack: java.io.IOException
2: pop
3: invokestatic com.google.common.base.Optional.absent:()Lcom/google/common/base/Optional;
areturn
start local 1 4: StackMap locals: java.nio.file.attribute.BasicFileAttributes
StackMap stack:
aload 1
invokeinterface java.nio.file.attribute.BasicFileAttributes.isDirectory:()Z
ifne 5
aload 1
invokeinterface java.nio.file.attribute.BasicFileAttributes.isSymbolicLink:()Z
ifeq 6
5: StackMap locals:
StackMap stack:
invokestatic com.google.common.base.Optional.absent:()Lcom/google/common/base/Optional;
areturn
6: StackMap locals:
StackMap stack:
aload 1
invokeinterface java.nio.file.attribute.BasicFileAttributes.size:()J
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
invokestatic com.google.common.base.Optional.of:(Ljava/lang/Object;)Lcom/google/common/base/Optional;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lcom/google/common/io/MoreFiles$PathByteSource;
1 2 1 attrs Ljava/nio/file/attribute/BasicFileAttributes;
4 7 1 attrs Ljava/nio/file/attribute/BasicFileAttributes;
Exception table:
from to target type
0 1 2 Class java.io.IOException
Signature: ()Lcom/google/common/base/Optional<Ljava/lang/Long;>;
public long size();
descriptor: ()J
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
invokevirtual com.google.common.io.MoreFiles$PathByteSource.readAttributes:()Ljava/nio/file/attribute/BasicFileAttributes;
astore 1
start local 1 1: aload 1
invokeinterface java.nio.file.attribute.BasicFileAttributes.isDirectory:()Z
ifeq 3
2: new java.io.IOException
dup
ldc "can't read: is a directory"
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals: java.nio.file.attribute.BasicFileAttributes
StackMap stack:
aload 1
invokeinterface java.nio.file.attribute.BasicFileAttributes.isSymbolicLink:()Z
ifeq 5
4: new java.io.IOException
dup
ldc "can't read: is a symbolic link"
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals:
StackMap stack:
aload 1
invokeinterface java.nio.file.attribute.BasicFileAttributes.size:()J
lreturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/google/common/io/MoreFiles$PathByteSource;
1 6 1 attrs Ljava/nio/file/attribute/BasicFileAttributes;
Exceptions:
throws java.io.IOException
public byte[] read();
descriptor: ()[B
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=1
start local 0 0: aconst_null
astore 1
aconst_null
astore 2
1: aload 0
getfield com.google.common.io.MoreFiles$PathByteSource.path:Ljava/nio/file/Path;
aload 0
getfield com.google.common.io.MoreFiles$PathByteSource.options:[Ljava/nio/file/OpenOption;
invokestatic java.nio.file.Files.newByteChannel:(Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/nio/channels/SeekableByteChannel;
astore 3
start local 3 2: aload 3
invokestatic java.nio.channels.Channels.newInputStream:(Ljava/nio/channels/ReadableByteChannel;)Ljava/io/InputStream;
aload 3
invokeinterface java.nio.channels.SeekableByteChannel.size:()J
invokestatic com.google.common.io.ByteStreams.toByteArray:(Ljava/io/InputStream;J)[B
3: aload 3
ifnull 4
aload 3
invokeinterface java.nio.channels.SeekableByteChannel.close:()V
4: StackMap locals: com.google.common.io.MoreFiles$PathByteSource java.lang.Throwable java.lang.Throwable java.nio.channels.SeekableByteChannel
StackMap stack: byte[]
areturn
StackMap locals:
StackMap stack: java.lang.Throwable
5: astore 1
6: aload 3
ifnull 7
aload 3
invokeinterface java.nio.channels.SeekableByteChannel.close:()V
end local 3 StackMap locals:
StackMap stack:
7: aload 1
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
8: astore 2
aload 1
ifnonnull 9
aload 2
astore 1
goto 10
StackMap locals:
StackMap stack:
9: aload 1
aload 2
if_acmpeq 10
aload 1
aload 2
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
10: aload 1
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lcom/google/common/io/MoreFiles$PathByteSource;
2 7 3 channel Ljava/nio/channels/SeekableByteChannel;
Exception table:
from to target type
2 3 5 any
1 4 8 any
5 8 8 any
Exceptions:
throws java.io.IOException
public com.google.common.io.CharSource asCharSource(java.nio.charset.Charset);
descriptor: (Ljava/nio/charset/Charset;)Lcom/google/common/io/CharSource;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield com.google.common.io.MoreFiles$PathByteSource.options:[Ljava/nio/file/OpenOption;
arraylength
ifne 2
1: new com.google.common.io.MoreFiles$PathByteSource$1
dup
aload 0
aload 0
aload 1
invokespecial com.google.common.io.MoreFiles$PathByteSource$1.<init>:(Lcom/google/common/io/MoreFiles$PathByteSource;Lcom/google/common/io/ByteSource;Ljava/nio/charset/Charset;)V
areturn
2: StackMap locals:
StackMap stack:
aload 0
aload 1
invokespecial com.google.common.io.ByteSource.asCharSource:(Ljava/nio/charset/Charset;)Lcom/google/common/io/CharSource;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lcom/google/common/io/MoreFiles$PathByteSource;
0 3 1 charset Ljava/nio/charset/Charset;
MethodParameters:
Name Flags
charset
public java.lang.String toString();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new java.lang.StringBuilder
dup
ldc "MoreFiles.asByteSource("
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield com.google.common.io.MoreFiles$PathByteSource.path:Ljava/nio/file/Path;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc ", "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0
getfield com.google.common.io.MoreFiles$PathByteSource.options:[Ljava/nio/file/OpenOption;
invokestatic java.util.Arrays.toString:([Ljava/lang/Object;)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc ")"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/google/common/io/MoreFiles$PathByteSource;
}
SourceFile: "MoreFiles.java"
NestHost: com.google.common.io.MoreFiles
InnerClasses:
private final PathByteSource = com.google.common.io.MoreFiles$PathByteSource of com.google.common.io.MoreFiles
com.google.common.io.MoreFiles$PathByteSource$1