org.gnu.jcifs
Class SMBMessage
java.lang.Object
|
+--org.gnu.jcifs.MarshalBuffer
|
+--org.gnu.jcifs.SMBMessage
- All Implemented Interfaces:
- NBTInput, NBTOutput
- final class SMBMessage
- extends MarshalBuffer
- implements NBTOutput, NBTInput
Constructor Summary |
(package private) |
SMBMessage(int capacity)
|
Method Summary |
void |
copyTo(int pos,
byte[] buf,
int off,
int len)
|
byte |
getByteParameterAt(int pos)
|
byte |
getCommand()
|
int |
getContentOffset()
|
int |
getContentSize()
|
int |
getErrorClass()
|
int |
getErrorCode()
|
int |
getIntParameterAt(int pos)
|
byte[] |
getMessageBuffer()
|
int |
getMessageSize()
|
int |
getMID()
|
int |
getNTErrorCode()
|
int |
getParameter(int index)
|
int |
getPID()
|
int |
getShortParameterAt(int pos)
|
short |
getSignedShortParameterAt(int pos)
|
int |
getSize()
|
int |
getTID()
|
int |
getUID()
|
int |
getWordCount()
|
boolean |
isResponse()
|
boolean |
isStringsAsUnicode()
Strings in SMB are UNICODE encoded (Flag2) |
int |
readFrom(java.io.InputStream in,
int size)
|
void |
receive(NBTSession nbt)
|
void |
send(NBTSession nbt)
|
void |
sendAndReceive(NBTSession nbt,
SMBMessage reply)
|
void |
setByteParameterAt(int pos,
byte val)
|
void |
setCanHandleLongNames()
We can handle long components in path names in the response |
void |
setCaselessPathnames()
|
void |
setCommand(byte cmd)
Set command type and resets packet |
void |
setContent(byte[] content)
|
void |
setContent(byte[] content,
int offset,
int len)
|
void |
setContent(MarshalBuffer content)
|
void |
setContentSize(int size)
|
void |
setExtendedAttributes()
If set the client is aware of extended attr |
void |
setIntParameterAt(int pos,
int val)
|
void |
setMID(int mid)
|
void |
setPID(int tid)
|
void |
setShortParameterAt(int pos,
int val)
|
void |
setStringsAsUnicode()
Strings in SMB are UNICODE encoded (Flag2) |
void |
setTID(int tid)
|
void |
setUID(int tid)
|
void |
setWordCount(int num)
|
void |
writeTo(int pos,
java.io.OutputStream out,
int size)
Writes the buffer to output stream |
void |
writeTo(int pos,
java.io.Writer out,
int size)
|
void |
writeTo(java.io.OutputStream out,
int size)
|
void |
writeTo(java.io.Writer out,
int size)
|
void |
zero(int pos,
int len)
|
Methods inherited from class org.gnu.jcifs.MarshalBuffer |
align, debug, getAsciiStringAt, getBigEndianShortAt, getByteAt, getBytes, getCapacity, getIntAt, getLongAt, getShortAt, getSignedShortAt, getUnicodeStringAt, getZTAsciiStringAt, setAsciiStringAt, setByteAt, setBytesAt, setBytesAt, setBytesAt, setCapacity, setIntAt, setIntAt, setShortAt, setShortAt, setSize, setZTAsciiStringAt, zero |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SMB_COM_CREATE_DIRECTORY
public static final byte SMB_COM_CREATE_DIRECTORY
SMB_COM_DELETE_DIRECTORY
public static final byte SMB_COM_DELETE_DIRECTORY
SMB_COM_OPEN
public static final byte SMB_COM_OPEN
SMB_COM_CREATE
public static final byte SMB_COM_CREATE
SMB_COM_CLOSE
public static final byte SMB_COM_CLOSE
SMB_COM_FLUSH
public static final byte SMB_COM_FLUSH
SMB_COM_DELETE
public static final byte SMB_COM_DELETE
SMB_COM_RENAME
public static final byte SMB_COM_RENAME
SMB_COM_QUERY_INFORMATION
public static final byte SMB_COM_QUERY_INFORMATION
SMB_COM_SET_INFORMATION
public static final byte SMB_COM_SET_INFORMATION
SMB_COM_READ
public static final byte SMB_COM_READ
SMB_COM_WRITE
public static final byte SMB_COM_WRITE
SMB_COM_LOCK_BYTE_RANGE
public static final byte SMB_COM_LOCK_BYTE_RANGE
SMB_COM_UNLOCK_BYTE_RANGE
public static final byte SMB_COM_UNLOCK_BYTE_RANGE
SMB_COM_CREATE_TEMPORARY
public static final byte SMB_COM_CREATE_TEMPORARY
SMB_COM_CREATE_NEW
public static final byte SMB_COM_CREATE_NEW
SMB_COM_CHECK_DIRECTORY
public static final byte SMB_COM_CHECK_DIRECTORY
SMB_COM_PROCESS_EXIT
public static final byte SMB_COM_PROCESS_EXIT
SMB_COM_SEEK
public static final byte SMB_COM_SEEK
SMB_COM_LOCK_AND_READ
public static final byte SMB_COM_LOCK_AND_READ
SMB_COM_WRITE_AND_UNLOCK
public static final byte SMB_COM_WRITE_AND_UNLOCK
SMB_COM_READ_RAW
public static final byte SMB_COM_READ_RAW
SMB_COM_READ_MPX
public static final byte SMB_COM_READ_MPX
SMB_COM_READ_MPX_SECONDARY
public static final byte SMB_COM_READ_MPX_SECONDARY
SMB_COM_WRITE_RAW
public static final byte SMB_COM_WRITE_RAW
SMB_COM_WRITE_MPX
public static final byte SMB_COM_WRITE_MPX
SMB_COM_WRITE_COMPLETE
public static final byte SMB_COM_WRITE_COMPLETE
SMB_COM_SET_INFORMATION2
public static final byte SMB_COM_SET_INFORMATION2
SMB_COM_QUERY_INFORMATION2
public static final byte SMB_COM_QUERY_INFORMATION2
SMB_COM_LOCKING_ANDX
public static final byte SMB_COM_LOCKING_ANDX
SMB_COM_TRANSACTION
public static final byte SMB_COM_TRANSACTION
SMB_COM_TRANSACTION_SECONDARY
public static final byte SMB_COM_TRANSACTION_SECONDARY
SMB_COM_IOCTL
public static final byte SMB_COM_IOCTL
SMB_COM_IOCTL_SECONDARY
public static final byte SMB_COM_IOCTL_SECONDARY
SMB_COM_COPY
public static final byte SMB_COM_COPY
SMB_COM_MOVE
public static final byte SMB_COM_MOVE
SMB_COM_ECHO
public static final byte SMB_COM_ECHO
SMB_COM_WRITE_AND_CLOSE
public static final byte SMB_COM_WRITE_AND_CLOSE
SMB_COM_OPEN_ANDX
public static final byte SMB_COM_OPEN_ANDX
SMB_COM_READ_ANDX
public static final byte SMB_COM_READ_ANDX
SMB_COM_WRITE_ANDX
public static final byte SMB_COM_WRITE_ANDX
SMB_COM_CLOSE_AND_TREE_DISC
public static final byte SMB_COM_CLOSE_AND_TREE_DISC
SMB_COM_TRANSACTION2
public static final byte SMB_COM_TRANSACTION2
SMB_COM_TRANSACTION2_SECONDARY
public static final byte SMB_COM_TRANSACTION2_SECONDARY
SMB_COM_FIND_CLOSE2
public static final byte SMB_COM_FIND_CLOSE2
SMB_COM_FIND_NOTIFY_CLOSE
public static final byte SMB_COM_FIND_NOTIFY_CLOSE
SMB_COM_TREE_CONNECT
public static final byte SMB_COM_TREE_CONNECT
SMB_COM_TREE_DISCONNECT
public static final byte SMB_COM_TREE_DISCONNECT
SMB_COM_NEGOTIATE
public static final byte SMB_COM_NEGOTIATE
SMB_COM_SESSION_SETUP_ANDX
public static final byte SMB_COM_SESSION_SETUP_ANDX
SMB_COM_LOGOFF_ANDX
public static final byte SMB_COM_LOGOFF_ANDX
SMB_COM_TREE_CONNECT_ANDX
public static final byte SMB_COM_TREE_CONNECT_ANDX
SMB_COM_QUERY_INFORMATION_DISK
public static final byte SMB_COM_QUERY_INFORMATION_DISK
SMB_COM_SEARCH
public static final byte SMB_COM_SEARCH
SMB_COM_FIND
public static final byte SMB_COM_FIND
SMB_COM_FIND_UNIQUE
public static final byte SMB_COM_FIND_UNIQUE
SMB_COM_NT_TRANSACT
public static final byte SMB_COM_NT_TRANSACT
SMB_COM_NT_TRANSACT_SECONDARY
public static final byte SMB_COM_NT_TRANSACT_SECONDARY
SMB_COM_NT_CREATE_ANDX
public static final byte SMB_COM_NT_CREATE_ANDX
SMB_COM_NT_CANCEL
public static final byte SMB_COM_NT_CANCEL
SMB_COM_OPEN_PRINT_FILE
public static final byte SMB_COM_OPEN_PRINT_FILE
SMB_COM_WRITE_PRINT_FILE
public static final byte SMB_COM_WRITE_PRINT_FILE
SMB_COM_CLOSE_PRINT_FILE
public static final byte SMB_COM_CLOSE_PRINT_FILE
SMB_COM_GET_PRINT_QUEUE
public static final byte SMB_COM_GET_PRINT_QUEUE
TRANS2_OPEN2
public static final short TRANS2_OPEN2
TRANS2_FIND_FIRST2
public static final short TRANS2_FIND_FIRST2
TRANS2_FIND_NEXT2
public static final short TRANS2_FIND_NEXT2
TRANS2_QUERY_FS_INFORMATION
public static final short TRANS2_QUERY_FS_INFORMATION
TRANS2_QUERY_PATH_INFORMATION
public static final short TRANS2_QUERY_PATH_INFORMATION
TRANS2_SET_PATH_INFORMATION
public static final short TRANS2_SET_PATH_INFORMATION
TRANS2_QUERY_FILE_INFORMATION
public static final short TRANS2_QUERY_FILE_INFORMATION
TRANS2_SET_FILE_INFORMATION
public static final short TRANS2_SET_FILE_INFORMATION
TRANS2_CREATE_DIRECTORY
public static final short TRANS2_CREATE_DIRECTORY
TRANS2_SESSION_SETUP
public static final short TRANS2_SESSION_SETUP
TRANS2_GET_DFS_REFERRAL
public static final short TRANS2_GET_DFS_REFERRAL
TRANS2_REPORT_DFS_INCONSISTENCY
public static final short TRANS2_REPORT_DFS_INCONSISTENCY
SMB_INFO_STANDARD
public static final short SMB_INFO_STANDARD
SMB_INFO_QUERY_EA_SIZE
public static final short SMB_INFO_QUERY_EA_SIZE
SMB_INFO_QUERY_EAS_FROM_LIST
public static final short SMB_INFO_QUERY_EAS_FROM_LIST
SMB_FIND_FILE_DIRECTORY_INFO
public static final short SMB_FIND_FILE_DIRECTORY_INFO
SMB_FIND_FILE_FULL_DIRECTORY_INFO
public static final short SMB_FIND_FILE_FULL_DIRECTORY_INFO
SMB_FIND_FILE_NAMES_INFO
public static final short SMB_FIND_FILE_NAMES_INFO
SMB_FIND_FILE_BOTH_DIRECTORY_INFO
public static final short SMB_FIND_FILE_BOTH_DIRECTORY_INFO
DT_DATA_BLOCK
public static final byte DT_DATA_BLOCK
DT_DIALECT
public static final byte DT_DIALECT
DT_PATHNAME
public static final byte DT_PATHNAME
DT_ASCII
public static final byte DT_ASCII
DT_VARIABLE_BLOCK
public static final byte DT_VARIABLE_BLOCK
SMBMessage
SMBMessage(int capacity)
setCommand
public void setCommand(byte cmd)
- Set command type and resets packet
- Parameters:
cmd
- command
getCommand
public byte getCommand()
getErrorClass
public int getErrorClass()
getErrorCode
public int getErrorCode()
getNTErrorCode
public int getNTErrorCode()
isResponse
public boolean isResponse()
setStringsAsUnicode
public void setStringsAsUnicode()
- Strings in SMB are UNICODE encoded (Flag2)
isStringsAsUnicode
public boolean isStringsAsUnicode()
- Strings in SMB are UNICODE encoded (Flag2)
setCanHandleLongNames
public void setCanHandleLongNames()
- We can handle long components in path names in the response
setExtendedAttributes
public void setExtendedAttributes()
- If set the client is aware of extended attr
setCaselessPathnames
public void setCaselessPathnames()
getTID
public int getTID()
setTID
public void setTID(int tid)
getPID
public int getPID()
setPID
public void setPID(int tid)
getUID
public int getUID()
setUID
public void setUID(int tid)
getMID
public int getMID()
setMID
public void setMID(int mid)
setWordCount
public void setWordCount(int num)
getWordCount
public int getWordCount()
getParameter
public int getParameter(int index)
getShortParameterAt
public int getShortParameterAt(int pos)
getSignedShortParameterAt
public short getSignedShortParameterAt(int pos)
setShortParameterAt
public void setShortParameterAt(int pos,
int val)
getIntParameterAt
public int getIntParameterAt(int pos)
setIntParameterAt
public void setIntParameterAt(int pos,
int val)
setByteParameterAt
public void setByteParameterAt(int pos,
byte val)
getByteParameterAt
public byte getByteParameterAt(int pos)
setContent
public void setContent(byte[] content,
int offset,
int len)
setContent
public void setContent(byte[] content)
setContentSize
public void setContentSize(int size)
setContent
public void setContent(MarshalBuffer content)
getContentSize
public int getContentSize()
getContentOffset
public int getContentOffset()
copyTo
public void copyTo(int pos,
byte[] buf,
int off,
int len)
getMessageSize
public int getMessageSize()
getMessageBuffer
public byte[] getMessageBuffer()
zero
public void zero(int pos,
int len)
send
public void send(NBTSession nbt)
throws java.io.IOException
receive
public void receive(NBTSession nbt)
throws java.io.IOException
sendAndReceive
public void sendAndReceive(NBTSession nbt,
SMBMessage reply)
throws java.io.IOException
getSize
public int getSize()
- Specified by:
getSize
in interface NBTOutput
- Overrides:
getSize
in class MarshalBuffer
writeTo
public void writeTo(java.io.Writer out,
int size)
throws java.io.IOException
writeTo
public void writeTo(java.io.OutputStream out,
int size)
throws java.io.IOException
- Specified by:
writeTo
in interface NBTOutput
writeTo
public void writeTo(int pos,
java.io.OutputStream out,
int size)
throws java.io.IOException
- Writes the buffer to output stream
- Parameters:
pos
- offset in bufferout
- output streamsize
- size to write
writeTo
public void writeTo(int pos,
java.io.Writer out,
int size)
throws java.io.IOException
readFrom
public int readFrom(java.io.InputStream in,
int size)
throws java.io.IOException
- Specified by:
readFrom
in interface NBTInput