title: Java decompiled code meaning
body: <p>i recently decompiled a bit of Java code, but parts are in a syntax I don't understand. I've searched for this but many threads I see say that code similar to this is compiler dependant. On java syntax checks, this returns errors.  </p>
  
  <pre><code>public void run()
      {
          try
          {
              final InputStream inputSocketInputStream = inputSocket.getInputStream();
              final OutputStream inputSocketOutputStream = inputSocket.getOutputStream();
              Socket socket = new Socket();
              socket.connect(new InetSocketAddress(APJP.APJP_LOCAL_HTTP_SERVER_ADDRESS, APJP.APJP_LOCAL_HTTP_SERVER_PORT));
              final InputStream outputSocketInputStream = socket.getInputStream();
              final OutputStream outputSocketOutputStream = socket.getOutputStream();
              Thread thread = new Thread() {
  
                  final InputStream val$inputSocketInputStream;
                  final OutputStream val$outputSocketOutputStream;
                  final HTTPProxyServerWorker this$0;
  
                  public void run()
                  {
                      try
                      {
                          byte abyte0[] = new byte[5120];
                          for(int i = 0; (i = inputSocketInputStream.read(abyte0)) != -1;)
                          {
                              outputSocketOutputStream.write(abyte0, 0, i);
                          }
  
                          outputSocketOutputStream.close();
                      }
                      catch(Exception exception1) { }
                  }
  
  
              {
                  this$0 = HTTPProxyServerWorker.this;
                  inputSocketInputStream = inputstream;
                  outputSocketOutputStream = outputstream;
                  super();
              }
              };
              thread.start();
              /** OMITTED **/
      }
  </code></pre>
  
  <p>I am confused about this bit: </p>
  
  <pre><code>Thread thread = new Thread() {
  
                  final InputStream val$inputSocketInputStream;
                  final OutputStream val$outputSocketOutputStream;
                  final HTTPProxyServerWorker this$0;
  
                  public void run()
                  {
                      try
                      {
                          byte abyte0[] = new byte[5120];
                          for(int i = 0; (i = inputSocketInputStream.read(abyte0)) != -1;)
                          {
                              outputSocketOutputStream.write(abyte0, 0, i);
                          }
  
                          outputSocketOutputStream.close();
                      }
                      catch(Exception exception1) { }
                  }
  
              //WHAT IS THIS BELOW? Constructor?
              {
                  this$0 = HTTPProxyServerWorker.this; 
                  inputSocketInputStream = inputstream;
                  outputSocketOutputStream = outputstream;
                  super();
              }
              };
  </code></pre>
  
  <p>Can anyone explain how this bit of code is supposed to work?</p>