TransactNamedPipeOutputStreampublic class TransactNamedPipeOutputStream extends SmbFileOutputStream
Fields Summary |
---|
private String | path | private SmbNamedPipe | pipe | private byte[] | tmp | private boolean | dcePipe |
Constructors Summary |
---|
TransactNamedPipeOutputStream(SmbNamedPipe pipe)
super(pipe, false, (pipe.pipeType & 0xFFFF00FF) | SmbFile.O_EXCL);
this.pipe = pipe;
this.dcePipe = ( pipe.pipeType & SmbNamedPipe.PIPE_TYPE_DCE_TRANSACT ) == SmbNamedPipe.PIPE_TYPE_DCE_TRANSACT;
path = pipe.unc;
|
Methods Summary |
---|
public void | close()
pipe.close();
| public void | write(int b)
tmp[0] = (byte)b;
write( tmp, 0, 1 );
| public void | write(byte[] b)
write( b, 0, b.length );
| public void | write(byte[] b, int off, int len)
if( len < 0 ) {
len = 0;
}
if(( pipe.pipeType & SmbNamedPipe.PIPE_TYPE_CALL ) == SmbNamedPipe.PIPE_TYPE_CALL ) {
pipe.send( new TransWaitNamedPipe( path ),
new TransWaitNamedPipeResponse() );
pipe.send( new TransCallNamedPipe( path, b, off, len ),
new TransCallNamedPipeResponse( pipe ));
} else if(( pipe.pipeType & SmbNamedPipe.PIPE_TYPE_TRANSACT ) ==
SmbNamedPipe.PIPE_TYPE_TRANSACT ) {
ensureOpen();
TransTransactNamedPipe req = new TransTransactNamedPipe( pipe.fid, b, off, len );
if (dcePipe) {
req.maxDataCount = 1024;
}
pipe.send( req, new TransTransactNamedPipeResponse( pipe ));
}
|
|