de.schlichtherle.truezip.fs.inst.jul.JulNio2OutputSocket Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of truezip-extension-jmx-jul Show documentation
Show all versions of truezip-extension-jmx-jul Show documentation
This module provides a file system manager and an I/O pool service
for managing and monitoring TrueZIP via JMX and java.util.logging.
Add the JAR artifact of this module to the run time class path to
make its services available for service location in the client API
modules.
/*
* Copyright (C) 2005-2015 Schlichtherle IT Services.
* All rights reserved. Use is subject to license terms.
*/
package de.schlichtherle.truezip.fs.inst.jul;
import de.schlichtherle.truezip.entry.Entry;
import de.schlichtherle.truezip.socket.OutputSocket;
import java.io.IOException;
import javax.annotation.concurrent.Immutable;
/**
* @author Christian Schlichtherle
*/
@Immutable
final class JulNio2OutputSocket
extends JulOutputSocket {
JulNio2OutputSocket(OutputSocket extends E> model, JulDirector director) {
super(model, director);
}
@Override
public java.nio.channels.SeekableByteChannel newSeekableByteChannel() throws IOException {
final java.nio.channels.SeekableByteChannel sbc = getBoundSocket().newSeekableByteChannel();
try {
return new JulOutputByteChannel(sbc, this);
} catch (IOException ex) {
try {
sbc.close();
} catch (IOException ex2) {
throw (IOException) ex2.initCause(ex);
}
throw ex;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy