- All Superinterfaces:
AutoCloseable,SmbPipeHandle
Internal interface for SMB pipe handle operations.
This interface extends SmbPipeHandle with additional methods needed
for internal pipe management and provides access to low-level pipe details.
- Author:
- mbechler
This interface is intended for internal use.
-
Method Summary
Modifier and TypeMethodDescriptionEnsures that the file handle is open and returns it.Ensures that the tree connection is established and returns it.getInput()Gets the input stream for reading from this pipe.Gets the output stream for writing to this pipe.intGets the type of this pipe.byte[]Gets the session key from the underlying SMB session.intrecv(byte[] buf, int off, int length) Receive data from the pipevoidsend(byte[] buf, int off, int length) Send data to the pipeintsendrecv(byte[] buf, int off, int length, byte[] inB, int maxRecvCnt) Performs a transaction on the pipe.
-
Method Details
-
getPipeType
int getPipeType()Gets the type of this pipe.- Returns:
- the pipe type
-
getSessionKey
Gets the session key from the underlying SMB session.- Returns:
- session key of the underlying smb session
- Throws:
CIFSException- if an error occurs retrieving the session key
-
getInput
Gets the input stream for reading from this pipe.- Specified by:
getInputin interfaceSmbPipeHandle- Returns:
- this pipe's input stream
- Throws:
CIFSException- if an error occurs getting the input stream
-
getOutput
Description copied from interface:SmbPipeHandleGets the output stream for writing to this pipe.- Specified by:
getOutputin interfaceSmbPipeHandle- Returns:
- this pipe's output stream
- Throws:
CIFSException- if an error occurs
-
ensureTreeConnected
Ensures that the tree connection is established and returns it.- Returns:
- tree connection
- Throws:
CIFSException- if an error occurs connecting to the tree
-
ensureOpen
Ensures that the file handle is open and returns it.- Returns:
- file handle
- Throws:
CIFSException- if an error occurs opening the file
-
recv
Receive data from the pipe- Parameters:
buf- buffer to receive data intooff- offset in the bufferlength- maximum length to receive- Returns:
- number of bytes received
- Throws:
IOException- if an I/O error occurs
-
send
Send data to the pipe- Parameters:
buf- buffer containing data to sendoff- offset in the bufferlength- length of data to send- Throws:
IOException- if an I/O error occurs
-
sendrecv
Performs a transaction on the pipe.- Parameters:
buf- the buffer containing the transaction dataoff- the offset in the bufferlength- the length of data to sendinB- the buffer to receive the responsemaxRecvCnt- the maximum number of bytes to receive- Returns:
- len the number of bytes received
- Throws:
IOException- if an I/O error occurs
-