.class public ReverseURL

.super java/lang/Object

.method public <init>()V
  .limit locals 1
  .limit stack 1
  aload_0
  invokenonvirtual java/lang/Object/<init>()V
  return
.end method

.method public static main([Ljava/lang/String;)V
  .limit locals 5
  .limit stack 4
  new joos/lib/JoosIO
  dup
  invokenonvirtual joos/lib/JoosIO/<init>()V
  astore_1
  aload_1
  ldc "Please enter a string you want reversed: "
  invokevirtual joos/lib/JoosIO/print(Ljava/lang/String;)V
  aload_1
  invokevirtual joos/lib/JoosIO/readLine()Ljava/lang/String;
  astore_3
  new joos/lib/JoosURL
  dup
  aconst_null
  ldc "http://java.sun.com/cgi-bin/backwards"
  invokenonvirtual joos/lib/JoosURL/<init>(Ljava/net/URL;Ljava/lang/String;)V
  astore_2
  aload_2
  invokevirtual joos/lib/JoosURL/openConnection()Z
  ifeq stop_0
  aload_2
  invokevirtual joos/lib/JoosURL/openOutputStream()Z
  ifeq stop_1
  aload_2
  ldc "string="
  aload_3
  dup
  ifnonnull stop_5
  pop
  ldc "null"
  stop_5:
  invokevirtual java/lang/String/concat(Ljava/lang/String;)Ljava/lang/String;
  invokevirtual joos/lib/JoosURL/println(Ljava/lang/String;)Z
  pop
  aload_2
  invokevirtual joos/lib/JoosURL/closeOutputStream()Z
  pop
  stop_1:
  aload_2
  invokevirtual joos/lib/JoosURL/openInputStream()Z
  ifeq stop_6
  start_7:
  aload_2
  invokevirtual joos/lib/JoosURL/readLine()Ljava/lang/String;
  dup
  astore 4
  aconst_null
  if_acmpeq stop_8
  aload_1
  aload 4
  invokevirtual joos/lib/JoosIO/println(Ljava/lang/String;)V
  goto start_7
  stop_8:
  aload_2
  invokevirtual joos/lib/JoosURL/closeInputStream()Z
  pop
  stop_6:
  stop_0:
  aload_2
  invokevirtual joos/lib/JoosURL/getErrorLog()Ljava/lang/String;
  aconst_null
  if_acmpeq stop_11
  aload_1
  ldc "***** Errors in this session were: "
  invokevirtual joos/lib/JoosIO/println(Ljava/lang/String;)V
  aload_1
  aload_2
  invokevirtual joos/lib/JoosURL/getErrorLog()Ljava/lang/String;
  invokevirtual joos/lib/JoosIO/println(Ljava/lang/String;)V
  stop_11:
  return
.end method

