/** * Closes this zip file. This method is idempotent. This method may cause I/O if the * zip file needs to be deleted. * * @throws IOException * if an IOException occurs. */ public void close() throws IOException { guard.close(); RandomAccessFile localRaf = raf; if (localRaf != null) { // Only close initialized instances synchronized (localRaf) { raf = null; localRaf.close(); } if (fileToDeleteOnClose != null) { fileToDeleteOnClose.delete(); fileToDeleteOnClose = null; } } }
/** * Closes the socket. After this method is invoked, subsequent * read/write operations will fail. */ public void close() throws IOException { guard.close(); IoBridge.closeSocket(fd); }
@Override public synchronized void close() { guard.close(); try { IoBridge.closeSocket(fd); } catch (IOException ignored) { } }
/** * Frees all resources held onto by this deflating algorithm. Any unused * input or output is discarded. This method should be called explicitly in * order to free native resources as soon as possible. After {@code end()} is * called, other methods will typically throw {@code IllegalStateException}. */ public synchronized void end() { guard.close(); endImpl(); }
@Override protected synchronized void close() throws IOException { guard.close(); IoBridge.closeSocket(fd); }
/** * Releases resources associated with this {@code Inflater}. Any unused * input or output is discarded. This method should be called explicitly in * order to free native resources as soon as possible. After {@code end()} is * called, other methods will typically throw {@code IllegalStateException}. */ public synchronized void end() { guard.close(); if (streamHandle != -1) { endImpl(streamHandle); inRead = 0; inLength = 0; streamHandle = -1; } }
/** * Closes this file. * * @throws IOException * if an error occurs while closing this file. */ public void close() throws IOException { guard.close(); synchronized (this) { if (channel != null && channel.isOpen()) { channel.close(); channel = null; } IoUtils.close(fd); } }
@Override public void close() throws IOException { guard.close(); synchronized (this) { if (channel != null) { channel.close(); } if (shouldClose) { IoUtils.close(fd); } else { // An owned fd has been invalidated by IoUtils.close, but // we need to explicitly stop using an unowned fd (http://b/4361076). fd = new FileDescriptor(); } } }
@Override public void close() throws IOException { guard.close(); synchronized (this) { if (channel != null) { channel.close(); } if (shouldClose) { IoUtils.close(fd); } else { // An owned fd has been invalidated by IoUtils.close, but // we need to explicitly stop using an unowned fd (http://b/4361076). fd = new FileDescriptor(); } } }
@Override public synchronized void close() { guard.close(); try { IoBridge.closeSocket(fd); } catch (IOException ignored) { } }
/** * Closes the socket. After this method is invoked, subsequent * read/write operations will fail. */ public void close() throws IOException { guard.close(); IoBridge.closeSocket(fd); }
/** * Closes the socket. After this method is invoked, subsequent * read/write operations will fail. */ public void close() throws IOException { guard.close(); IoBridge.closeSocket(fd); }
/** * Frees all resources held onto by this deflating algorithm. Any unused * input or output is discarded. This method should be called explicitly in * order to free native resources as soon as possible. After {@code end()} is * called, other methods will typically throw {@code IllegalStateException}. */ public synchronized void end() { guard.close(); endImpl(); }
@Override public synchronized void close() { guard.close(); try { IoBridge.closeSocket(fd); } catch (IOException ignored) { } }
@Override protected synchronized void close() throws IOException { guard.close(); IoBridge.closeSocket(fd); }
@Override public synchronized void close() { guard.close(); try { IoBridge.closeSocket(fd); } catch (IOException ignored) { } }
/** * Frees all resources held onto by this deflating algorithm. Any unused * input or output is discarded. This method should be called explicitly in * order to free native resources as soon as possible. After {@code end()} is * called, other methods will typically throw {@code IllegalStateException}. */ public synchronized void end() { guard.close(); endImpl(); }
/** * Closes the socket. After this method is invoked, subsequent * read/write operations will fail. */ public void close() throws IOException { guard.close(); IoBridge.closeSocket(fd); }
/** * Closes the socket. After this method is invoked, subsequent * read/write operations will fail. */ public void close() throws IOException { guard.close(); IoBridge.closeSocket(fd); }
/** * Frees all resources held onto by this deflating algorithm. Any unused * input or output is discarded. This method should be called explicitly in * order to free native resources as soon as possible. After {@code end()} is * called, other methods will typically throw {@code IllegalStateException}. */ public synchronized void end() { guard.close(); endImpl(); }