protected synchronized SmbFileHandleImpl ensureOpen () throws CIFSException { if ( !isOpen() ) { // one extra acquire to keep this open till the stream is released this.handle = this.file.openUnshared(this.openFlags, this.access, this.sharing, SmbConstants.ATTR_NORMAL, 0).acquire(); if ( this.append ) { this.fp = this.handle.getInitialSize(); if ( log.isDebugEnabled() ) { log.debug("File pointer is at " + this.fp); } } return this.handle; } log.trace("File already open"); return this.handle.acquire(); }
protected synchronized SmbFileHandleImpl ensureOpen () throws CIFSException { if ( !isOpen() ) { // one extra acquire to keep this open till the stream is released this.handle = this.file.openUnshared(this.openFlags, this.access, this.sharing, SmbConstants.ATTR_NORMAL, 0).acquire(); if ( this.append ) { this.fp = this.handle.getInitialSize(); if ( log.isDebugEnabled() ) { log.debug("File pointer is at " + this.fp); } } return this.handle; } log.trace("File already open"); return this.handle.acquire(); }
protected void doSendFragment(byte[] buf, int off, int length, boolean isDirect) throws IOException { if (out != null && out.isOpen() == false) throw new IOException("DCERPC pipe is no longer open"); if (in == null) in = (SmbFileInputStream)pipe.getNamedPipeInputStream(); if (out == null) out = (SmbFileOutputStream)pipe.getNamedPipeOutputStream(); if (isDirect) { out.writeDirect( buf, off, length, 1 ); return; } out.write(buf, off, length); } protected void doReceiveFragment(byte[] buf, boolean isDirect) throws IOException {
protected void doSendFragment(byte[] buf, int off, int length, boolean isDirect) throws IOException { if (out != null && out.isOpen() == false) throw new IOException("DCERPC pipe is no longer open"); if (in == null) in = (SmbFileInputStream)pipe.getNamedPipeInputStream(); if (out == null) out = (SmbFileOutputStream)pipe.getNamedPipeOutputStream(); if (isDirect) { out.writeDirect( buf, off, length, 1 ); return; } out.write(buf, off, length); } protected void doReceiveFragment(byte[] buf, boolean isDirect) throws IOException {
protected void doSendFragment(byte[] buf, int off, int length, boolean isDirect) throws IOException { if (out != null && out.isOpen() == false) throw new IOException("DCERPC pipe is no longer open"); if (in == null) in = (SmbFileInputStream)pipe.getNamedPipeInputStream(); if (out == null) out = (SmbFileOutputStream)pipe.getNamedPipeOutputStream(); if (isDirect) { out.writeDirect( buf, off, length, 1 ); return; } out.write(buf, off, length); } protected void doReceiveFragment(byte[] buf, boolean isDirect) throws IOException {
protected void doSendFragment(byte[] buf, int off, int length, boolean isDirect) throws IOException { if (out != null && out.isOpen() == false) throw new IOException("DCERPC pipe is no longer open"); if (in == null) in = (SmbFileInputStream)pipe.getNamedPipeInputStream(); if (out == null) out = (SmbFileOutputStream)pipe.getNamedPipeOutputStream(); if (isDirect) { out.writeDirect( buf, off, length, 1 ); return; } out.write(buf, off, length); } protected void doReceiveFragment(byte[] buf, boolean isDirect) throws IOException {