Class Share

java.lang.Object
com.hierynomus.smbj.share.Share
All Implemented Interfaces:
AutoCloseable
Direct Known Subclasses:
DiskShare, PipeShare, PrinterShare

public class Share extends Object implements AutoCloseable
  • Field Details

    • smbPath

      protected final SmbPath smbPath
    • treeConnect

      protected final TreeConnect treeConnect
    • session

      protected Session session
  • Method Details

    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException
    • isConnected

      public boolean isConnected()
    • getSmbPath

      public SmbPath getSmbPath()
    • getTreeConnect

      public TreeConnect getTreeConnect()
    • getCreateStatusHandler

      protected StatusHandler 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 code
      isFsCtl - true if the control code is an FSCTL; false if it is an IOCTL
      inData - 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 code
      isFsCtl - true if the control code is an FSCTL; false if it is an IOCTL
      inData - the control code dependent input data
      inOffset - the offset in inData where the input data starts
      inLength - the number of bytes from inData to send, starting at offset
      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 code
      isFsCtl - true if the control code is an FSCTL; false if it is an IOCTL
      inData - the control code dependent input data
      inOffset - the offset in inData where the input data starts
      inLength - the number of bytes from inData to send, starting at inOffset
      outData - the buffer where the response data should be written
      outOffset - the offset in outData where the output data should be written
      outLength - the maximum amount of data to write in outData, starting at outOffset
      Returns:
      the number of bytes written to outData
    • ioctlAsync

      public Future<SMB2IoctlResponse> ioctlAsync(long ctlCode, boolean isFsCtl, ByteChunkProvider inputData)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object