public class com.mongodb.internal.connection.SocketStream implements com.mongodb.connection.Stream
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: com.mongodb.internal.connection.SocketStream
super_class: java.lang.Object
{
private final com.mongodb.ServerAddress address;
descriptor: Lcom/mongodb/ServerAddress;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.mongodb.connection.SocketSettings settings;
descriptor: Lcom/mongodb/connection/SocketSettings;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.mongodb.connection.SslSettings sslSettings;
descriptor: Lcom/mongodb/connection/SslSettings;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final javax.net.SocketFactory socketFactory;
descriptor: Ljavax/net/SocketFactory;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.mongodb.connection.BufferProvider bufferProvider;
descriptor: Lcom/mongodb/connection/BufferProvider;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private volatile java.net.Socket socket;
descriptor: Ljava/net/Socket;
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
private volatile java.io.OutputStream outputStream;
descriptor: Ljava/io/OutputStream;
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
private volatile java.io.InputStream inputStream;
descriptor: Ljava/io/InputStream;
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
private volatile boolean isClosed;
descriptor: Z
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
public void <init>(com.mongodb.ServerAddress, com.mongodb.connection.SocketSettings, com.mongodb.connection.SslSettings, javax.net.SocketFactory, com.mongodb.connection.BufferProvider);
descriptor: (Lcom/mongodb/ServerAddress;Lcom/mongodb/connection/SocketSettings;Lcom/mongodb/connection/SslSettings;Ljavax/net/SocketFactory;Lcom/mongodb/connection/BufferProvider;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=6, args_size=6
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
ldc "address"
aload 1
invokestatic com.mongodb.assertions.Assertions.notNull:(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.mongodb.ServerAddress
putfield com.mongodb.internal.connection.SocketStream.address:Lcom/mongodb/ServerAddress;
2: aload 0
ldc "settings"
aload 2
invokestatic com.mongodb.assertions.Assertions.notNull:(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.mongodb.connection.SocketSettings
putfield com.mongodb.internal.connection.SocketStream.settings:Lcom/mongodb/connection/SocketSettings;
3: aload 0
ldc "sslSettings"
aload 3
invokestatic com.mongodb.assertions.Assertions.notNull:(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.mongodb.connection.SslSettings
putfield com.mongodb.internal.connection.SocketStream.sslSettings:Lcom/mongodb/connection/SslSettings;
4: aload 0
ldc "socketFactory"
aload 4
invokestatic com.mongodb.assertions.Assertions.notNull:(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
checkcast javax.net.SocketFactory
putfield com.mongodb.internal.connection.SocketStream.socketFactory:Ljavax/net/SocketFactory;
5: aload 0
ldc "bufferProvider"
aload 5
invokestatic com.mongodb.assertions.Assertions.notNull:(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
checkcast com.mongodb.connection.BufferProvider
putfield com.mongodb.internal.connection.SocketStream.bufferProvider:Lcom/mongodb/connection/BufferProvider;
6: return
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lcom/mongodb/internal/connection/SocketStream;
0 7 1 address Lcom/mongodb/ServerAddress;
0 7 2 settings Lcom/mongodb/connection/SocketSettings;
0 7 3 sslSettings Lcom/mongodb/connection/SslSettings;
0 7 4 socketFactory Ljavax/net/SocketFactory;
0 7 5 bufferProvider Lcom/mongodb/connection/BufferProvider;
MethodParameters:
Name Flags
address final
settings final
sslSettings final
socketFactory final
bufferProvider final
public void open();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=1
start local 0 0: aload 0
aload 0
invokevirtual com.mongodb.internal.connection.SocketStream.initializeSocket:()Ljava/net/Socket;
putfield com.mongodb.internal.connection.SocketStream.socket:Ljava/net/Socket;
1: aload 0
aload 0
getfield com.mongodb.internal.connection.SocketStream.socket:Ljava/net/Socket;
invokevirtual java.net.Socket.getOutputStream:()Ljava/io/OutputStream;
putfield com.mongodb.internal.connection.SocketStream.outputStream:Ljava/io/OutputStream;
2: aload 0
aload 0
getfield com.mongodb.internal.connection.SocketStream.socket:Ljava/net/Socket;
invokevirtual java.net.Socket.getInputStream:()Ljava/io/InputStream;
putfield com.mongodb.internal.connection.SocketStream.inputStream:Ljava/io/InputStream;
3: goto 7
StackMap locals:
StackMap stack: java.io.IOException
4: astore 1
start local 1 5: aload 0
invokevirtual com.mongodb.internal.connection.SocketStream.close:()V
6: new com.mongodb.MongoSocketOpenException
dup
ldc "Exception opening socket"
aload 0
invokevirtual com.mongodb.internal.connection.SocketStream.getAddress:()Lcom/mongodb/ServerAddress;
aload 1
invokespecial com.mongodb.MongoSocketOpenException.<init>:(Ljava/lang/String;Lcom/mongodb/ServerAddress;Ljava/lang/Throwable;)V
athrow
end local 1 7: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lcom/mongodb/internal/connection/SocketStream;
5 7 1 e Ljava/io/IOException;
Exception table:
from to target type
0 3 4 Class java.io.IOException
protected java.net.Socket initializeSocket();
descriptor: ()Ljava/net/Socket;
flags: (0x0004) ACC_PROTECTED
Code:
stack=4, locals=4, args_size=1
start local 0 0: aload 0
getfield com.mongodb.internal.connection.SocketStream.address:Lcom/mongodb/ServerAddress;
invokevirtual com.mongodb.ServerAddress.getSocketAddresses:()Ljava/util/List;
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 1
start local 1 1: goto 9
2: StackMap locals: java.util.Iterator
StackMap stack:
aload 0
getfield com.mongodb.internal.connection.SocketStream.socketFactory:Ljavax/net/SocketFactory;
invokevirtual javax.net.SocketFactory.createSocket:()Ljava/net/Socket;
astore 2
start local 2 3: aload 2
aload 1
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.net.InetSocketAddress
aload 0
getfield com.mongodb.internal.connection.SocketStream.settings:Lcom/mongodb/connection/SocketSettings;
aload 0
getfield com.mongodb.internal.connection.SocketStream.sslSettings:Lcom/mongodb/connection/SslSettings;
invokestatic com.mongodb.internal.connection.SocketStreamHelper.initialize:(Ljava/net/Socket;Ljava/net/InetSocketAddress;Lcom/mongodb/connection/SocketSettings;Lcom/mongodb/connection/SslSettings;)V
4: aload 2
5: areturn
6: StackMap locals: com.mongodb.internal.connection.SocketStream java.util.Iterator java.net.Socket
StackMap stack: java.net.SocketTimeoutException
astore 3
start local 3 7: aload 1
invokeinterface java.util.Iterator.hasNext:()Z
ifne 9
8: aload 3
athrow
end local 3 end local 2 9: StackMap locals:
StackMap stack:
aload 1
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
10: new com.mongodb.MongoSocketException
dup
ldc "Exception opening socket"
aload 0
invokevirtual com.mongodb.internal.connection.SocketStream.getAddress:()Lcom/mongodb/ServerAddress;
invokespecial com.mongodb.MongoSocketException.<init>:(Ljava/lang/String;Lcom/mongodb/ServerAddress;)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lcom/mongodb/internal/connection/SocketStream;
1 11 1 inetSocketAddresses Ljava/util/Iterator<Ljava/net/InetSocketAddress;>;
3 9 2 socket Ljava/net/Socket;
7 9 3 e Ljava/net/SocketTimeoutException;
Exception table:
from to target type
3 5 6 Class java.net.SocketTimeoutException
Exceptions:
throws java.io.IOException
public org.bson.ByteBuf getBuffer(int);
descriptor: (I)Lorg/bson/ByteBuf;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield com.mongodb.internal.connection.SocketStream.bufferProvider:Lcom/mongodb/connection/BufferProvider;
iload 1
invokeinterface com.mongodb.connection.BufferProvider.getBuffer:(I)Lorg/bson/ByteBuf;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/internal/connection/SocketStream;
0 1 1 size I
MethodParameters:
Name Flags
size final
public void write(java.util.List<org.bson.ByteBuf>);
descriptor: (Ljava/util/List;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=4, args_size=2
start local 0 start local 1 0: aload 1
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 3
goto 3
StackMap locals: com.mongodb.internal.connection.SocketStream java.util.List top java.util.Iterator
StackMap stack:
1: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.bson.ByteBuf
astore 2
start local 2 2: aload 0
getfield com.mongodb.internal.connection.SocketStream.outputStream:Ljava/io/OutputStream;
aload 2
invokeinterface org.bson.ByteBuf.array:()[B
iconst_0
aload 2
invokeinterface org.bson.ByteBuf.limit:()I
invokevirtual java.io.OutputStream.write:([BII)V
end local 2 3: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 1
4: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lcom/mongodb/internal/connection/SocketStream;
0 5 1 buffers Ljava/util/List<Lorg/bson/ByteBuf;>;
2 3 2 cur Lorg/bson/ByteBuf;
Exceptions:
throws java.io.IOException
Signature: (Ljava/util/List<Lorg/bson/ByteBuf;>;)V
MethodParameters:
Name Flags
buffers final
public org.bson.ByteBuf read(int);
descriptor: (I)Lorg/bson/ByteBuf;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=6, args_size=2
start local 0 start local 1 0: aload 0
getfield com.mongodb.internal.connection.SocketStream.bufferProvider:Lcom/mongodb/connection/BufferProvider;
iload 1
invokeinterface com.mongodb.connection.BufferProvider.getBuffer:(I)Lorg/bson/ByteBuf;
astore 2
start local 2 1: iconst_0
istore 3
start local 3 2: aload 2
invokeinterface org.bson.ByteBuf.array:()[B
astore 4
start local 4 3: goto 9
4: StackMap locals: org.bson.ByteBuf int byte[]
StackMap stack:
aload 0
getfield com.mongodb.internal.connection.SocketStream.inputStream:Ljava/io/InputStream;
aload 4
iload 3
aload 2
invokeinterface org.bson.ByteBuf.limit:()I
iload 3
isub
invokevirtual java.io.InputStream.read:([BII)I
istore 5
start local 5 5: iload 5
iconst_m1
if_icmpne 8
6: aload 2
invokeinterface org.bson.ByteBuf.release:()V
7: new com.mongodb.MongoSocketReadException
dup
ldc "Prematurely reached end of stream"
aload 0
invokevirtual com.mongodb.internal.connection.SocketStream.getAddress:()Lcom/mongodb/ServerAddress;
invokespecial com.mongodb.MongoSocketReadException.<init>:(Ljava/lang/String;Lcom/mongodb/ServerAddress;)V
athrow
8: StackMap locals: int
StackMap stack:
iload 3
iload 5
iadd
istore 3
end local 5 9: StackMap locals:
StackMap stack:
iload 3
aload 2
invokeinterface org.bson.ByteBuf.limit:()I
if_icmplt 4
10: aload 2
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lcom/mongodb/internal/connection/SocketStream;
0 11 1 numBytes I
1 11 2 buffer Lorg/bson/ByteBuf;
2 11 3 totalBytesRead I
3 11 4 bytes [B
5 9 5 bytesRead I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
numBytes final
public void openAsync(com.mongodb.connection.AsyncCompletionHandler<java.lang.Void>);
descriptor: (Lcom/mongodb/connection/AsyncCompletionHandler;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: new java.lang.UnsupportedOperationException
dup
new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
aload 0
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc " does not support asynchronous operations."
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.UnsupportedOperationException.<init>:(Ljava/lang/String;)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/internal/connection/SocketStream;
0 1 1 handler Lcom/mongodb/connection/AsyncCompletionHandler<Ljava/lang/Void;>;
Signature: (Lcom/mongodb/connection/AsyncCompletionHandler<Ljava/lang/Void;>;)V
MethodParameters:
Name Flags
handler final
public void writeAsync(java.util.List<org.bson.ByteBuf>, com.mongodb.connection.AsyncCompletionHandler<java.lang.Void>);
descriptor: (Ljava/util/List;Lcom/mongodb/connection/AsyncCompletionHandler;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: new java.lang.UnsupportedOperationException
dup
new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
aload 0
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc " does not support asynchronous operations."
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.UnsupportedOperationException.<init>:(Ljava/lang/String;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/internal/connection/SocketStream;
0 1 1 buffers Ljava/util/List<Lorg/bson/ByteBuf;>;
0 1 2 handler Lcom/mongodb/connection/AsyncCompletionHandler<Ljava/lang/Void;>;
Signature: (Ljava/util/List<Lorg/bson/ByteBuf;>;Lcom/mongodb/connection/AsyncCompletionHandler<Ljava/lang/Void;>;)V
MethodParameters:
Name Flags
buffers final
handler final
public void readAsync(int, com.mongodb.connection.AsyncCompletionHandler<org.bson.ByteBuf>);
descriptor: (ILcom/mongodb/connection/AsyncCompletionHandler;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: new java.lang.UnsupportedOperationException
dup
new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
aload 0
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc " does not support asynchronous operations."
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.UnsupportedOperationException.<init>:(Ljava/lang/String;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/internal/connection/SocketStream;
0 1 1 numBytes I
0 1 2 handler Lcom/mongodb/connection/AsyncCompletionHandler<Lorg/bson/ByteBuf;>;
Signature: (ILcom/mongodb/connection/AsyncCompletionHandler<Lorg/bson/ByteBuf;>;)V
MethodParameters:
Name Flags
numBytes final
handler final
public com.mongodb.ServerAddress getAddress();
descriptor: ()Lcom/mongodb/ServerAddress;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.internal.connection.SocketStream.address:Lcom/mongodb/ServerAddress;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/internal/connection/SocketStream;
com.mongodb.connection.SocketSettings getSettings();
descriptor: ()Lcom/mongodb/connection/SocketSettings;
flags: (0x0000)
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.internal.connection.SocketStream.settings:Lcom/mongodb/connection/SocketSettings;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/internal/connection/SocketStream;
public void close();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
iconst_1
putfield com.mongodb.internal.connection.SocketStream.isClosed:Z
1: aload 0
getfield com.mongodb.internal.connection.SocketStream.socket:Ljava/net/Socket;
ifnull 5
2: aload 0
getfield com.mongodb.internal.connection.SocketStream.socket:Ljava/net/Socket;
invokevirtual java.net.Socket.close:()V
3: goto 5
StackMap locals:
StackMap stack: java.io.IOException
4: pop
5: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/mongodb/internal/connection/SocketStream;
Exception table:
from to target type
0 3 4 Class java.io.IOException
public boolean isClosed();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.mongodb.internal.connection.SocketStream.isClosed:Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/mongodb/internal/connection/SocketStream;
}
SourceFile: "SocketStream.java"