@Override
 public void close() throws IOException {
   super.close();
   buf = null;
   head = pos = tail = 0;
   mark = -1;
 }
 @Override
 public void close() throws IOException {
   try {
     super.close();
   } finally {
     entity.consumeContent();
   }
 }
 @Override
 public final synchronized void close() throws IOException {
   try {
     super.close();
   } catch (final OutOfMemoryError e) {
     ConcurrentLog.logException(e);
   }
   this.finish();
 }
Esempio n. 4
0
 /**
  * Closes this input stream and releases any system resources associated with the stream.
  *
  * @exception java.io.IOException If an error occurs closing the file.
  */
 public synchronized void close() throws IOException {
   if (reliable != null) {
     try {
       super.close();
     } finally {
       reliable.closeInputFile();
       reliable = null;
     }
   }
 }
Esempio n. 5
0
 @Override
 public void close() throws IOException {
   try {
     super.close();
   } finally {
     try {
       zipFile.close();
     } catch (IOException e2) {
       LOG.debug("Could not close the zip file");
     }
   }
 }
 @Override
 public void close() throws IOException {
   if (!closed) {
     try {
       copy(this, new NullOutputStream());
     } catch (IOException e) {
     } finally {
       closed = true;
       super.close();
     }
   }
 }
Esempio n. 7
0
    @Override
    public void close() throws IOException {
      if (tmp_out != null) {
        Utils.closeQuietly(tmp_out);
        tmp_out = null;

        // Rename the file to the permanent name
        if (!errord) {
          File newtmpfile = new File(cachedir, urlToCacheFilename(url));
          errord = !tmpfile.renameTo(newtmpfile);
          if (!errord) {
            tmpfile = newtmpfile;
          }
        }

        // Add to cache
        if (errord) {
          tmpfile.delete();
        } else {
          synchronized (ImageCache.this) {
            Log.d(TAG, "adding " + url);
            filecachelist.add(tmpfile);
            filecachemap.put(url, tmpfile);
            filecachesize += tmpfile.length();
            // Trim cache
            while (filecachesize > MAX_FILECACHE_SIZE) {
              File trimfile = filecachelist.remove(0); // oldest
              Log.d(TAG, "trimming " + trimfile.getName());
              filecachemap.remove(trimfile.getName());
              filecachesize -= trimfile.length();
              trimfile.delete();
            }
          }
        }
      }
      super.close();
    }
Esempio n. 8
0
 @Override
 public void close() throws IOException {
   super.close();
   if (sftp != null) sftp.disconnect();
 }
 @Override
 public void close() throws IOException {
   super.close();
   out.close();
 }
 @Override
 public void close() throws IOException {
   super.close();
   inputStreamClosed = true;
 }
Esempio n. 11
0
 /* (non-Javadoc)
  * @see java.io.FilterInputStream#close()
  */
 @Override
 public void close() throws IOException {
   System.out.println();
   System.out.flush();
   super.close();
 }
 @Override
 public void close() throws IOException {
   Log.d(tag, log.toString() + (overflow ? "…" : ""));
   super.close();
 }
 @Override
 public void close() throws IOException {
   super.close();
   flushLog();
 }
 @Override
 public void close() throws IOException {
   super.close();
   alternate.close();
 }
Esempio n. 15
0
 /**
  * * Closes the stream and immediately afterward closes the referenced socket.
  *
  * <p>
  *
  * @exception IOException If there is an error in closing the stream or socket. *
  */
 public void close() throws IOException {
   super.close();
   __socket.close();
 }
Esempio n. 16
0
 /**
  * Closes this input stream and releases any system resources associated with the stream. This
  * method simply performs <code>in.close()</code>.
  *
  * @exception IOException if an I/O error occurs.
  * @see java.io.FilterInputStream#in
  */
 @Override
 public void close() throws IOException {
   closed = true;
   super.close();
 }
 @Override
 public void close() throws IOException {
   super.close();
   mFile.delete();
 }