Search in sources :

Example 1 with ResourceOutputStream

use of lucee.commons.io.res.util.ResourceOutputStream in project Lucee by lucee.

the class SMBResource method getOutputStream.

@Override
public OutputStream getOutputStream(boolean append) throws IOException {
    ResourceUtil.checkGetOutputStreamOK(this);
    try {
        provider.lock(this);
        SmbFile file = _file();
        OutputStream os = new SmbFileOutputStream(file, append);
        return IOUtil.toBufferedOutputStream(new ResourceOutputStream(this, os));
    } catch (IOException e) {
        provider.unlock(this);
        // just in case it is an SmbException too... for cfcatch type="java.io.IOException"
        throw new IOException(e);
    }
}
Also used : ResourceOutputStream(lucee.commons.io.res.util.ResourceOutputStream) OutputStream(java.io.OutputStream) ResourceOutputStream(lucee.commons.io.res.util.ResourceOutputStream) SmbFileOutputStream(jcifs.smb.SmbFileOutputStream) IOException(java.io.IOException) SmbFileOutputStream(jcifs.smb.SmbFileOutputStream) SmbFile(jcifs.smb.SmbFile)

Aggregations

IOException (java.io.IOException)1 OutputStream (java.io.OutputStream)1 SmbFile (jcifs.smb.SmbFile)1 SmbFileOutputStream (jcifs.smb.SmbFileOutputStream)1 ResourceOutputStream (lucee.commons.io.res.util.ResourceOutputStream)1