Package com.hierynomus.smbj.share
Class Share
- java.lang.Object
-
- com.hierynomus.smbj.share.Share
-
- All Implemented Interfaces:
java.lang.AutoCloseable
- Direct Known Subclasses:
DiskShare
,PipeShare
,PrinterShare
public class Share extends java.lang.Object implements java.lang.AutoCloseable
-
-
Field Summary
Fields Modifier and Type Field Description protected Session
session
protected SmbPath
smbPath
protected TreeConnect
treeConnect
-
Method Summary
Modifier and Type Method Description void
close()
boolean
equals(java.lang.Object obj)
protected StatusHandler
getCreateStatusHandler()
SmbPath
getSmbPath()
TreeConnect
getTreeConnect()
int
hashCode()
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.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.java.util.concurrent.Future<SMB2IoctlResponse>
ioctlAsync(long ctlCode, boolean isFsCtl, ByteChunkProvider inputData)
boolean
isConnected()
-
-
-
Field Detail
-
smbPath
protected final SmbPath smbPath
-
treeConnect
protected final TreeConnect treeConnect
-
session
protected Session session
-
-
Method Detail
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
java.io.IOException
-
isConnected
public boolean isConnected()
-
getSmbPath
public SmbPath getSmbPath()
-
getTreeConnect
public TreeConnect getTreeConnect()
-
getCreateStatusHandler
protected StatusHandler getCreateStatusHandler()
-
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
null
if 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 ininData
where the input data startsinLength
- the number of bytes frominData
to send, starting atoffset
- Returns:
- the response data or
null
if 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 ininData
where the input data startsinLength
- the number of bytes frominData
to send, starting atinOffset
outData
- the buffer where the response data should be writtenoutOffset
- the offset inoutData
where 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 java.util.concurrent.Future<SMB2IoctlResponse> ioctlAsync(long ctlCode, boolean isFsCtl, ByteChunkProvider inputData)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-