dumpBytes = !dumpBytes; if (dumpBytes) {  try { if (fw == null) { fw = new FileOutputStream("log.txt"); dw = new BufferedOutputStream(fw); } } catch (FileNotFoundException fnfe) { System.out.println(fnfe.getMessage()); }  } else {  try {  if (dw != null) dw.close(); if (fw != null) fw.close(); dw = null; fw = null;  } catch(IOException ioe) {  System.out.println(ioe.getMessage()); } }  System.out.println("Data Stream output is now " + dumpBytes);
producer.toggleDebug(codePage);
   protected final void toggleDebug () {      dumpBytes = !dumpBytes;      if (dumpBytes) {         try {            if (fw == null) {               fw = new FileOutputStream("log.txt");               dw = new BufferedOutputStream(fw);            }         }         catch (FileNotFoundException fnfe) {            System.out.println(fnfe.getMessage());         }      }      else {         try {            if (dw != null)               dw.close();            if (fw != null)               fw.close();            dw = null;            fw = null;         }         catch(IOException ioe) {            System.out.println(ioe.getMessage());         }      }      System.out.println("Data Stream output is now " + dumpBytes);   }