public class NamedPipe
extends java.lang.Object
implements java.io.Closeable
| Modifier and Type | Field and Description |
|---|---|
protected SMB2FileId |
fileId |
protected org.slf4j.Logger |
logger |
protected SmbPath |
name |
protected PipeShare |
share |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
closeSilently() |
SMB2FileId |
getFileId() |
java.lang.String |
getName() |
byte[] |
ioctl(long ctlCode,
boolean isFsCtl,
byte[] inData,
int inOffset,
int inLength)
Sends a control code directly to a specified device driver, causing the corresponding device to perform the
corresponding operation.
|
int |
ioctl(long ctlCode,
boolean isFsCtl,
byte[] inData,
int inOffset,
int inLength,
byte[] outData,
int outOffset,
int outLength)
Sends a control code directly to a specified device driver, causing the corresponding device to perform the
corresponding operation.
|
FsCtlPipePeekResponse |
peek()
Requests that the server read data from this pipe without removing it.
|
FsCtlPipePeekResponse |
peek(int maxDataSize)
Requests that the server read data from this pipe without removing it.
|
int |
read(byte[] buffer)
Read data from this pipe starting into the given buffer.
|
int |
read(byte[] buffer,
int offset,
int length)
Read data from this pipe into the given buffer.
|
byte[] |
transact(byte[] inBuffer)
Performs a transaction on this pipe.
|
int |
transact(byte[] inBuffer,
byte[] outBuffer)
Performs a transaction on this pipe.
|
int |
transact(byte[] inBuffer,
int inOffset,
int inLength,
byte[] outBuffer,
int outOffset,
int outLength)
Performs a transaction on this pipe.
|
int |
write(byte[] buffer)
Write the data in buffer to this pipe.
|
int |
write(byte[] buffer,
int offset,
int length)
Write the data in buffer to this pipe.
|
protected final org.slf4j.Logger logger
protected PipeShare share
protected SMB2FileId fileId
protected SmbPath name
public java.lang.String getName()
public SMB2FileId getFileId()
public int write(byte[] buffer)
buffer - the data to writepublic int write(byte[] buffer,
int offset,
int length)
buffer - the data to writeoffset - the start offset in the datalength - the number of bytes that are writtenpublic int read(byte[] buffer)
buffer - the buffer to write intopublic int read(byte[] buffer,
int offset,
int length)
buffer - the buffer to write intooffset - the start offset in the buffer at which to write datalength - the maximum number of bytes to readpublic byte[] transact(byte[] inBuffer)
inBuffer - the input messagepublic int transact(byte[] inBuffer,
byte[] outBuffer)
This method is equivalent to calling transact(inBuffer, 0, inBuffer.length, outBuffer, 0, outBuffer.length.
inBuffer - the input messageoutBuffer - the buffer in which to write the output messageoutBufferpublic int transact(byte[] inBuffer,
int inOffset,
int inLength,
byte[] outBuffer,
int outOffset,
int outLength)
inBuffer - the input messageinOffset - the offset in inBuffer at which the input message startinLength - the length of the input message in inBuffer starting at inOffsetoutBuffer - the buffer in which to write the output messageoutOffset - the offset in outBuffer at which the output message should be writtenoutLength - the maximum number of bytes that may be written to outBuffer starting from outOffsetoutBufferpublic FsCtlPipePeekResponse peek()
peek(0).public FsCtlPipePeekResponse peek(int maxDataSize)
maxDataSize - the maximum amount of data to peekpublic byte[] ioctl(long ctlCode,
boolean isFsCtl,
byte[] inData,
int inOffset,
int inLength)
ctlCode - the control codeisFsCtl - true if the control code is an FSCTL; false if it is an IOCTLinData - the control code dependent input datainOffset - the offset in inData where the input data startsinLength - the number of bytes from inData to send, starting at offsetnull if the control code did not produce a responsepublic int ioctl(long ctlCode,
boolean isFsCtl,
byte[] inData,
int inOffset,
int inLength,
byte[] outData,
int outOffset,
int outLength)
ctlCode - the control codeisFsCtl - true if the control code is an FSCTL; false if it is an IOCTLinData - the control code dependent input datainOffset - the offset in inData where the input data startsinLength - the number of bytes from inData to send, starting at inOffsetoutData - the buffer where the response data should be writtenoutOffset - the offset in outData where the output data should be writtenoutLength - the maximum amount of data to write in outData, starting at outOffsetoutDatapublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic void closeSilently()