Class Share
java.lang.Object
com.hierynomus.smbj.share.Share
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
DiskShare, PipeShare, PrinterShare
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Sessionprotected final SmbPathprotected final TreeConnect -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanprotected StatusHandlerinthashCode()byte[]ioctl(long ctlCode, boolean isFsCtl, byte[] inData) Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation.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.intioctl(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.ioctlAsync(long ctlCode, boolean isFsCtl, ByteChunkProvider inputData) booleanqueryInfo(SMB2FileId fileId, SMB2QueryInfoRequest.SMB2QueryInfoType infoType, Set<SecurityInformation> securityInfo, FileInformationClass fileInformationClass, FileSystemInformationClass fileSystemInformationClass)
-
Field Details
-
smbPath
-
treeConnect
-
session
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
isConnected
public boolean isConnected() -
getSmbPath
-
getTreeConnect
-
getCreateStatusHandler
-
queryInfo
public SMB2QueryInfoResponse queryInfo(SMB2FileId fileId, SMB2QueryInfoRequest.SMB2QueryInfoType infoType, Set<SecurityInformation> securityInfo, FileInformationClass fileInformationClass, FileSystemInformationClass fileSystemInformationClass) -
ioctl
public byte[] ioctl(long ctlCode, boolean isFsCtl, byte[] inData) Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation.- Parameters:
ctlCode- the control codeisFsCtl- true if the control code is an FSCTL; false if it is an IOCTLinData- the control code dependent input data- Returns:
- the response data or
nullif the control code did not produce a response
-
ioctl
public 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.- Parameters:
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 ininDatawhere the input data startsinLength- the number of bytes frominDatato send, starting atoffset- Returns:
- the response data or
nullif the control code did not produce a response
-
ioctl
public 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.- Parameters:
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 ininDatawhere the input data startsinLength- the number of bytes frominDatato send, starting atinOffsetoutData- the buffer where the response data should be writtenoutOffset- the offset inoutDatawhere the output data should be writtenoutLength- the maximum amount of data to write inoutData, starting atoutOffset- Returns:
- the number of bytes written to
outData
-
ioctlAsync
public Future<SMB2IoctlResponse> ioctlAsync(long ctlCode, boolean isFsCtl, ByteChunkProvider inputData) -
hashCode
-
equals
-