} else { if (doInput) { inputStream = new ByteArrayInputStream(getDirectoryListing()); }  if (doOutput) throw new ProtocolException ("file: protocol does not support output on directories"); }
  public void connect() throws IOException  {    // Call is ignored if already connected.    if (connected)      return;        // If not connected, then file needs to be openned.    file = new File (getURL().getFile());    if (doInput)      inputStream = new BufferedInputStream(new FileInputStream(file));        if (doOutput)      outputStream = new BufferedOutputStream(new FileOutputStream(file));        connected = true;  }