@Override
    public void run() {
      while (!interrupted()) {
        try (final Socket socket = server.getSocket().accept();
            final InputStream in = socket.getInputStream()) {
          server.handleReceivedByteBuffer(receiveBoundedBytes(in));
        } catch (final IOException | SecurityException e) {
          server.handleError(e, e.getMessage());
        }
      }
    }
Simple thread class that receives command data.
java/ui/src/main/java/com/google/security/zynamics/bindiff/socketserver/SocketServer.java