public class sun.net.NetworkServer implements java.lang.Runnable, java.lang.Cloneable
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: sun.net.NetworkServer
super_class: java.lang.Object
{
public java.net.Socket clientSocket;
descriptor: Ljava/net/Socket;
flags: (0x0001) ACC_PUBLIC
private java.lang.Thread serverInstance;
descriptor: Ljava/lang/Thread;
flags: (0x0002) ACC_PRIVATE
private java.net.ServerSocket serverSocket;
descriptor: Ljava/net/ServerSocket;
flags: (0x0002) ACC_PRIVATE
public java.io.PrintStream clientOutput;
descriptor: Ljava/io/PrintStream;
flags: (0x0001) ACC_PUBLIC
public java.io.InputStream clientInput;
descriptor: Ljava/io/InputStream;
flags: (0x0001) ACC_PUBLIC
public void close();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield sun.net.NetworkServer.clientSocket:Ljava/net/Socket;
invokevirtual java.net.Socket.close:()V
1: aload 0
aconst_null
putfield sun.net.NetworkServer.clientSocket:Ljava/net/Socket;
2: aload 0
aconst_null
putfield sun.net.NetworkServer.clientInput:Ljava/io/InputStream;
3: aload 0
aconst_null
putfield sun.net.NetworkServer.clientOutput:Ljava/io/PrintStream;
4: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lsun/net/NetworkServer;
Exceptions:
throws java.io.IOException
public boolean clientIsOpen();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield sun.net.NetworkServer.clientSocket:Ljava/net/Socket;
ifnull 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lsun/net/NetworkServer;
public final void run();
descriptor: ()V
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=6, locals=3, args_size=1
start local 0 0: aload 0
getfield sun.net.NetworkServer.serverSocket:Ljava/net/ServerSocket;
ifnull 16
1: invokestatic java.lang.Thread.currentThread:()Ljava/lang/Thread;
bipush 10
invokevirtual java.lang.Thread.setPriority:(I)V
2: StackMap locals:
StackMap stack:
aload 0
getfield sun.net.NetworkServer.serverSocket:Ljava/net/ServerSocket;
invokevirtual java.net.ServerSocket.accept:()Ljava/net/Socket;
astore 1
start local 1 3: aload 0
invokevirtual sun.net.NetworkServer.clone:()Ljava/lang/Object;
checkcast sun.net.NetworkServer
astore 2
start local 2 4: aload 2
aconst_null
putfield sun.net.NetworkServer.serverSocket:Ljava/net/ServerSocket;
5: aload 2
aload 1
putfield sun.net.NetworkServer.clientSocket:Ljava/net/Socket;
6: new java.lang.Thread
dup
aload 2
invokespecial java.lang.Thread.<init>:(Ljava/lang/Runnable;)V
invokevirtual java.lang.Thread.start:()V
end local 2 end local 1 7: goto 2
StackMap locals:
StackMap stack: java.lang.Exception
8: astore 1
start local 1 9: getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc "Server failure\n"
invokevirtual java.io.PrintStream.print:(Ljava/lang/String;)V
10: aload 1
invokevirtual java.lang.Exception.printStackTrace:()V
11: aload 0
getfield sun.net.NetworkServer.serverSocket:Ljava/net/ServerSocket;
invokevirtual java.net.ServerSocket.close:()V
12: goto 14
StackMap locals: sun.net.NetworkServer java.lang.Exception
StackMap stack: java.io.IOException
13: pop
14: StackMap locals:
StackMap stack:
getstatic java.lang.System.out:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
ldc "cs="
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield sun.net.NetworkServer.serverSocket:Ljava/net/ServerSocket;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc "\n"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.io.PrintStream.print:(Ljava/lang/String;)V
end local 1 15: goto 27
16: StackMap locals:
StackMap stack:
aload 0
new java.io.PrintStream
dup
17: new java.io.BufferedOutputStream
dup
aload 0
getfield sun.net.NetworkServer.clientSocket:Ljava/net/Socket;
invokevirtual java.net.Socket.getOutputStream:()Ljava/io/OutputStream;
invokespecial java.io.BufferedOutputStream.<init>:(Ljava/io/OutputStream;)V
18: iconst_0
ldc "ISO8859_1"
invokespecial java.io.PrintStream.<init>:(Ljava/io/OutputStream;ZLjava/lang/String;)V
19: putfield sun.net.NetworkServer.clientOutput:Ljava/io/PrintStream;
20: aload 0
new java.io.BufferedInputStream
dup
aload 0
getfield sun.net.NetworkServer.clientSocket:Ljava/net/Socket;
invokevirtual java.net.Socket.getInputStream:()Ljava/io/InputStream;
invokespecial java.io.BufferedInputStream.<init>:(Ljava/io/InputStream;)V
putfield sun.net.NetworkServer.clientInput:Ljava/io/InputStream;
21: aload 0
invokevirtual sun.net.NetworkServer.serviceRequest:()V
22: goto 24
StackMap locals:
StackMap stack: java.lang.Exception
23: pop
24: StackMap locals:
StackMap stack:
aload 0
invokevirtual sun.net.NetworkServer.close:()V
25: goto 27
StackMap locals:
StackMap stack: java.io.IOException
26: pop
27: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 28 0 this Lsun/net/NetworkServer;
3 7 1 ns Ljava/net/Socket;
4 7 2 n Lsun/net/NetworkServer;
9 15 1 e Ljava/lang/Exception;
Exception table:
from to target type
2 7 8 Class java.lang.Exception
11 12 13 Class java.io.IOException
16 22 23 Class java.lang.Exception
24 25 26 Class java.io.IOException
public final void startServer(int);
descriptor: (I)V
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 0
new java.net.ServerSocket
dup
iload 1
bipush 50
invokespecial java.net.ServerSocket.<init>:(II)V
putfield sun.net.NetworkServer.serverSocket:Ljava/net/ServerSocket;
1: aload 0
new java.lang.Thread
dup
aload 0
invokespecial java.lang.Thread.<init>:(Ljava/lang/Runnable;)V
putfield sun.net.NetworkServer.serverInstance:Ljava/lang/Thread;
2: aload 0
getfield sun.net.NetworkServer.serverInstance:Ljava/lang/Thread;
invokevirtual java.lang.Thread.start:()V
3: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lsun/net/NetworkServer;
0 4 1 port I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
port
public void serviceRequest();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=1
start local 0 0: sipush 300
newarray 8
astore 1
start local 1 1: aload 0
getfield sun.net.NetworkServer.clientOutput:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
ldc "Echo server "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
invokevirtual java.lang.Class.getName:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "\n"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.io.PrintStream.print:(Ljava/lang/String;)V
2: aload 0
getfield sun.net.NetworkServer.clientOutput:Ljava/io/PrintStream;
invokevirtual java.io.PrintStream.flush:()V
3: goto 5
start local 2 4: StackMap locals: byte[] int
StackMap stack:
aload 0
getfield sun.net.NetworkServer.clientOutput:Ljava/io/PrintStream;
aload 1
iconst_0
iload 2
invokevirtual java.io.PrintStream.write:([BII)V
end local 2 5: StackMap locals:
StackMap stack:
aload 0
getfield sun.net.NetworkServer.clientInput:Ljava/io/InputStream;
aload 1
iconst_0
aload 1
arraylength
invokevirtual java.io.InputStream.read:([BII)I
dup
istore 2
start local 2 6: ifge 4
7: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lsun/net/NetworkServer;
1 8 1 buf [B
4 5 2 n I
6 8 2 n I
Exceptions:
throws java.io.IOException
public static void main(java.lang.String[]);
descriptor: ([Ljava/lang/String;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=2, args_size=1
start local 0 0: new sun.net.NetworkServer
dup
invokespecial sun.net.NetworkServer.<init>:()V
sipush 8888
invokevirtual sun.net.NetworkServer.startServer:(I)V
1: goto 4
StackMap locals:
StackMap stack: java.io.IOException
2: astore 1
start local 1 3: getstatic java.lang.System.out:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
ldc "Server failed: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc "\n"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.io.PrintStream.print:(Ljava/lang/String;)V
end local 1 4: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 argv [Ljava/lang/String;
3 4 1 e Ljava/io/IOException;
Exception table:
from to target type
0 1 2 Class java.io.IOException
MethodParameters:
Name Flags
argv
public java.lang.Object clone();
descriptor: ()Ljava/lang/Object;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.clone:()Ljava/lang/Object;
1: areturn
2: StackMap locals:
StackMap stack: java.lang.CloneNotSupportedException
pop
3: new java.lang.InternalError
dup
invokespecial java.lang.InternalError.<init>:()V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lsun/net/NetworkServer;
Exception table:
from to target type
0 1 2 Class java.lang.CloneNotSupportedException
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aconst_null
putfield sun.net.NetworkServer.clientSocket:Ljava/net/Socket;
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lsun/net/NetworkServer;
}
SourceFile: "NetworkServer.java"