.class public TestURL

.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 4
  .limit stack 4
  new joos/lib/JoosIO
  dup
  invokenonvirtual joos/lib/JoosIO/<init>()V
  astore_1
  new joos/lib/JoosURL
  dup
  aconst_null
  ldc "http://www.brics.dk/cgi-mis/test-cgi?laurie"
  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 "result="
  ldc "this can be anything"
  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_3
  aconst_null
  if_acmpeq stop_8
  aload_1
  aload_3
  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

