コード例 #1
0
 @Override
 public void close() throws IOException {
   super.close();
   buf = null;
   head = pos = tail = 0;
   mark = -1;
 }
コード例 #2
0
 @Override
 public void close() throws IOException {
   try {
     super.close();
   } finally {
     entity.consumeContent();
   }
 }
コード例 #3
0
 @Override
 public final synchronized void close() throws IOException {
   try {
     super.close();
   } catch (final OutOfMemoryError e) {
     ConcurrentLog.logException(e);
   }
   this.finish();
 }
コード例 #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;
     }
   }
 }
コード例 #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");
     }
   }
 }
コード例 #6
0
 @Override
 public void close() throws IOException {
   if (!closed) {
     try {
       copy(this, new NullOutputStream());
     } catch (IOException e) {
     } finally {
       closed = true;
       super.close();
     }
   }
 }
コード例 #7
0
ファイル: ImageCache.java プロジェクト: richq/Beebdroid
    @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();
    }
コード例 #8
0
 @Override
 public void close() throws IOException {
   super.close();
   if (sftp != null) sftp.disconnect();
 }
コード例 #9
0
 @Override
 public void close() throws IOException {
   super.close();
   out.close();
 }
コード例 #10
0
 @Override
 public void close() throws IOException {
   super.close();
   inputStreamClosed = true;
 }
コード例 #11
0
 /* (non-Javadoc)
  * @see java.io.FilterInputStream#close()
  */
 @Override
 public void close() throws IOException {
   System.out.println();
   System.out.flush();
   super.close();
 }
コード例 #12
0
 @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();
 }
コード例 #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();
 }
コード例 #16
0
ファイル: LimitedInputStream.java プロジェクト: sabob/ratel
 /**
  * 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();
 }
コード例 #17
0
 @Override
 public void close() throws IOException {
   super.close();
   mFile.delete();
 }