### start(String, int) Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/transport/tcp/async/AsyncPacketReader.html Starts the asynchronous packet reading process. ```APIDOC ## Method: start ### Description Starts the asynchronous reading process for the packet reader. ### Signature `public void start(java.lang.String remoteHost, int soTimeout)` ### Parameters - **remoteHost** (java.lang.String) - The remote host address. - **soTimeout** (int) - The socket timeout value. ``` -------------------------------- ### Start AsyncPacketReader Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/transport/tcp/async/AsyncPacketReader.html Starts the asynchronous packet reading process with a specified remote host and timeout. ```java public void start​(java.lang.String remoteHost, int soTimeout) ``` -------------------------------- ### Get Header Start Position Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb/SMB1Header.html Retrieves the starting position of the header. ```java public int getHeaderStartPosition() ``` -------------------------------- ### AceType Iteration Example Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/msdtyp/ace/AceType.html Example showing how to iterate over the enum constants. ```java public static AceType[] values() ``` ```java for (AceType c : AceType.values()) System.out.println(c); ``` -------------------------------- ### Get Mac Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/security/bc/BCSecurityProvider.html Retrieves a Mac instance by name. ```java public Mac getMac​(java.lang.String name) ``` -------------------------------- ### Get Target Info Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/ntlm/messages/NtlmChallenge.html Retrieves the target information. ```java public TargetInfo getTargetInfo() ``` -------------------------------- ### getServer() / setServer() Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/connection/ConnectionContext.html Methods to get or set the server associated with the connection context. ```APIDOC ### Methods `public Server getServer()` `public void setServer(Server server)` ### Description Retrieves or updates the Server object associated with this connection context. ``` -------------------------------- ### Iterating Over Enum Constants Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/SMB3CompressionAlgorithm.html Example demonstrating how to iterate over all available compression algorithm constants. ```java for (SMB3CompressionAlgorithm c : SMB3CompressionAlgorithm.values()) System.out.println(c); ``` -------------------------------- ### Get Create Action Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/messages/SMB2CreateResponse.html Retrieves the create action performed. ```java public SMB2CreateAction getCreateAction() ``` -------------------------------- ### Init Method Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/auth/NtlmAuthenticator.html Initializes the authenticator with the provided SMB configuration. ```java public void init​(SmbConfig config) ``` -------------------------------- ### Get Server Name Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/server/Server.html Retrieves the configured server name. ```java public java.lang.String getServerName() ``` -------------------------------- ### Init Method Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/auth/SpnegoAuthenticator.html Initializes the authenticator with the provided SMB configuration. ```java public void init​(SmbConfig config) ``` -------------------------------- ### Get Server GUID Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/server/Server.html Retrieves the unique identifier for the server. ```java public java.util.UUID getServerGUID() ``` -------------------------------- ### build Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/SmbConfig.Builder.html Constructs the SmbConfig instance. ```APIDOC ## SmbConfig.Builder.build() ### Description Finalizes the configuration and returns a new SmbConfig instance. ``` -------------------------------- ### Initialize Server Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/server/Server.html Configures the server with identity, dialect, security, and capability settings. ```java public void init​(java.util.UUID serverGUID, SMB2Dialect dialectRevision, int securityMode, java.util.Set capabilities) ``` -------------------------------- ### Get Windows Version Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/ntlm/messages/NtlmChallenge.html Retrieves the Windows version information. ```java public WindowsVersion getVersion() ``` -------------------------------- ### init(SmbConfig config) Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/auth/Authenticator.html Initializes the authenticator with the provided SMB configuration. ```APIDOC ### void init(SmbConfig config) Initializes the authenticator instance using the specified SMB configuration settings. ``` -------------------------------- ### Write GUID to Buffer Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/msdtyp/MsDataTypes.html Writes a UUID to the provided buffer according to the MS-DTYP GUID packet representation. ```java public static void putGuid​(java.util.UUID guid, Buffer buffer) ``` -------------------------------- ### init(UUID serverGUID, SMB2Dialect dialectRevision, int securityMode, Set capabilities) Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/server/Server.html Initializes the server with specific configuration parameters. ```APIDOC ## Method: init ### Description Configures the server with the provided GUID, dialect, security mode, and capabilities. ### Parameters - **serverGUID** (UUID) - The unique identifier for the server. - **dialectRevision** (SMB2Dialect) - The SMB2 dialect to use. - **securityMode** (int) - The security mode configuration. - **capabilities** (Set) - A set of global SMB2 capabilities. ``` -------------------------------- ### Get Compression Algorithms Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/messages/negotiate/SMB2CompressionCapabilities.html Retrieves the list of supported SMB3 compression algorithms. ```java public java.util.List getCompressionAlgorithms() ``` -------------------------------- ### Iterating over SMB3EncryptionCipher constants Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/SMB3EncryptionCipher.html Example demonstrating how to iterate over the available enum constants. ```java public static SMB3EncryptionCipher[] values() ``` ```java for (SMB3EncryptionCipher c : SMB3EncryptionCipher.values()) System.out.println(c); ``` -------------------------------- ### Get Length Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/copy/CopyChunkRequest.Chunk.html Retrieves the length of the chunk. ```java public long getLength() ``` -------------------------------- ### Initialize Mac Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/security/Mac.html Initializes the MAC with the provided key. ```java void init​(byte[] key) throws SecurityException ``` -------------------------------- ### Server Constructor Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/server/Server.html Initializes a new Server instance with a specified name and port. ```java public Server​(java.lang.String serverName, int port) ``` -------------------------------- ### MechListMIC Accessors Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/spnego/NegTokenTarg.html Methods to get and set the MechListMIC. ```java public byte[] getMechListMic() ``` ```java public void setMechListMic​(byte[] mechListMic) ``` -------------------------------- ### Get Name Method Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/share/NamedPipe.html Retrieves the name of the pipe. ```java public java.lang.String getName() ``` -------------------------------- ### connect(String hostname) Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/SMBClient.html Establishes a connection to the specified host on the default SMB port (445). ```APIDOC ## Connection connect(String hostname) ### Description Connects to the host at the provided hostname on the default port (445). ### Parameters - **hostname** (String) - Required - The hostname to connect to. ### Returns - **Connection** - An established connection. ### Throws - **java.io.IOException** - If the connection could not be established. ``` -------------------------------- ### init(byte[] key) Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/security/Mac.html Initializes the MAC with the provided secret key. ```APIDOC ### void init(byte[] key) Initializes the MAC with the given key. **Parameters:** - **key** (byte[]) - The secret key to initialize the MAC. **Throws:** - **SecurityException** - If an error occurs during initialization. ``` -------------------------------- ### Get DerivationFunction Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/security/bc/BCSecurityProvider.html Retrieves a DerivationFunction instance by name. ```java public DerivationFunction getDerivationFunction​(java.lang.String name) ``` -------------------------------- ### init(byte[] key) Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/security/bc/BCMac.html Initializes the MAC with the provided secret key. ```APIDOC ### void init(byte[] key) Initializes the MAC instance with the specified key. ``` -------------------------------- ### Get AEADBlockCipher Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/security/bc/BCSecurityProvider.html Retrieves an AEADBlockCipher instance by name. ```java public AEADBlockCipher getAEADBlockCipher​(java.lang.String name) ``` -------------------------------- ### Get Cipher Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/security/bc/BCSecurityProvider.html Retrieves a Cipher instance by name. ```java public Cipher getCipher​(java.lang.String name) ``` -------------------------------- ### JceMac init Method Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/security/jce/JceMac.html Initializes the MAC with the provided key. ```java public void init​(byte[] key) throws SecurityException ``` -------------------------------- ### Iterating over SMB2CreateDisposition constants Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/SMB2CreateDisposition.html Example of how to iterate over all available enum constants. ```java public static SMB2CreateDisposition[] values() ``` ```java for (SMB2CreateDisposition c : SMB2CreateDisposition.values()) System.out.println(c); ``` -------------------------------- ### Iterating over SMB2InfoType constants Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/messages/SMB2SetInfoRequest.SMB2InfoType.html Example usage for iterating over the enum constants. ```java for (SMB2SetInfoRequest.SMB2InfoType c : SMB2SetInfoRequest.SMB2InfoType.values()) System.out.println(c); ``` -------------------------------- ### Get MessageDigest Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/security/bc/BCSecurityProvider.html Retrieves a MessageDigest instance by name. ```java public MessageDigest getDigest​(java.lang.String name) ``` -------------------------------- ### Server(String serverName, int port) Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/server/Server.html Constructs a new Server instance with the specified name and port. ```APIDOC ## Constructor: Server(String serverName, int port) ### Description Initializes a new instance of the Server class. ### Parameters - **serverName** (String) - The name of the server. - **port** (int) - The port number for the server. ``` -------------------------------- ### Get Methods Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/protocol/commons/concurrent/PromiseBackedFuture.html Methods to retrieve the result of the computation. ```java public V get() throws java.util.concurrent.ExecutionException ``` ```java public V get​(long timeout, java.util.concurrent.TimeUnit unit) throws java.util.concurrent.ExecutionException ``` -------------------------------- ### guest() Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/auth/AuthenticationContext.html Creates a guest AuthenticationContext. ```APIDOC ## guest() ### Description Returns a static AuthenticationContext configured for guest access. ``` -------------------------------- ### authenticate Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/connection/Connection.html Authenticates the user on the current connection to start a new session. ```APIDOC ## Session authenticate(AuthenticationContext authContext) ### Description Authenticate the user on this connection in order to start a (new) session. ### Parameters - **authContext** (AuthenticationContext) - Required - The authentication context containing user credentials. ### Returns - **Session** - A new Session that is authenticated for the user. ``` -------------------------------- ### build() Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/GSSContextConfig.Builder.html Constructs the GSSContextConfig instance based on the configured builder settings. ```APIDOC ### Method `public GSSContextConfig build()` ### Description Finalizes the configuration and returns a new GSSContextConfig instance. ``` -------------------------------- ### connect(String hostname, int port) Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/SMBClient.html Establishes a connection to the specified host on a custom port. ```APIDOC ## Connection connect(String hostname, int port) ### Description Connects to the host at the provided hostname on the specified port. ### Parameters - **hostname** (String) - Required - The hostname to connect to. - **port** (int) - Required - The port to connect to. ### Returns - **Connection** - An established connection. ### Throws - **java.io.IOException** - If the connection could not be established. ``` -------------------------------- ### Get End of File Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/msfscc/fileinformation/FileEndOfFileInformation.html Retrieves the end-of-file value. ```java public long getEndOfFile() ``` -------------------------------- ### Iterate over FileInformationClass constants Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/msfscc/FileInformationClass.html Example demonstrating how to iterate through all defined enum constants. ```java public static FileInformationClass[] values() ``` ```java for (FileInformationClass c : FileInformationClass.values()) System.out.println(c); ``` -------------------------------- ### MsDataTypes.readGuid() Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/msdtyp/MsDataTypes.html Reads a GUID packet from the buffer and returns it as a UUID. ```APIDOC ### Method `public static java.util.UUID readGuid(Buffer buffer)` ### Description Reads a GUID packet from the buffer and returns the corresponding UUID. ### Throws - `Buffer.BufferException`: If an underflow occurs (less than 16 bytes available). ``` -------------------------------- ### ServerList() Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/server/ServerList.html Constructs a new instance of the ServerList class. ```APIDOC ## Constructor: ServerList() ### Description Initializes a new ServerList object. ### Signature `public ServerList()` ``` -------------------------------- ### Create Directory Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/share/DiskShare.html Creates a new directory at the specified path. ```java public void mkdir​(java.lang.String path) throws SMBApiException ``` -------------------------------- ### MsDataTypes.putGuid() Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/msdtyp/MsDataTypes.html Writes a UUID into the provided buffer as a GUID packet. ```APIDOC ### Method `public static void putGuid(java.util.UUID guid, Buffer buffer)` ### Description Writes the provided GUID to the buffer according to the [MS-DTYP].pdf 2.3.4.2 GUID Packet representation. ``` -------------------------------- ### BCMac Initialization Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/security/bc/BCMac.html Initializes the MAC instance with the provided key. ```java public void init​(byte[] key) ``` -------------------------------- ### Get Security Information Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/share/DiskEntry.html Retrieves the security descriptor for the entry. ```java public SecurityDescriptor getSecurityInformation​(java.util.Set securityInfo) throws SMBApiException ``` -------------------------------- ### connect Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/connection/Connection.html Establishes a connection to the specified host and port. ```APIDOC ## void connect(String hostname, int port) ### Description Connects to the SMB server at the specified hostname and port. ### Parameters - **hostname** (String) - Required - The remote host address. - **port** (int) - Required - The port number to connect to. ### Throws - **java.io.IOException** - If an I/O error occurs during connection. ``` -------------------------------- ### Get Buffer Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/transport/tcp/async/PacketBufferReader.html Retrieves the underlying ByteBuffer used by the reader. ```java public java.nio.ByteBuffer getBuffer() ``` -------------------------------- ### Get Capabilities Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/server/Server.html Retrieves the set of global SMB2 capabilities enabled for the server. ```java public java.util.Set getCapabilities() ``` -------------------------------- ### SMBSessionBuilder.establish(AuthenticationContext) Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/index-all.html Establishes a new session on the connection using the provided authentication credentials. ```APIDOC ## SMBSessionBuilder.establish(AuthenticationContext) ### Description Establish a new session on the connection using the passed credentials. ### Method Method: establish(AuthenticationContext) ### Parameters - **AuthenticationContext** (Object) - Required - The authentication context containing credentials for the session. ``` -------------------------------- ### Get Connection Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/session/Session.html Retrieves the underlying connection associated with this session. ```java public Connection getConnection() ``` -------------------------------- ### Iterate Over AceFlags Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/msdtyp/ace/AceFlags.html Example showing how to iterate over all constants defined in the AceFlags enum. ```java for (AceFlags c : AceFlags.values()) System.out.println(c); ``` -------------------------------- ### Get Security Mode Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/server/Server.html Retrieves the configured security mode. ```java public int getSecurityMode() ``` -------------------------------- ### Configuration Methods Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/SmbConfig.Builder.html Methods used to configure various aspects of the SMB client connection. ```java public SmbConfig.Builder withRandomProvider(java.util.Random random) ``` ```java public SmbConfig.Builder withSecurityProvider(SecurityProvider securityProvider) ``` ```java public SmbConfig.Builder withSocketFactory(javax.net.SocketFactory socketFactory) ``` ```java public SmbConfig.Builder withDialects(SMB2Dialect... dialects) ``` ```java public SmbConfig.Builder withDialects(java.lang.Iterable dialects) ``` ```java public SmbConfig.Builder withClientGuid(java.util.UUID clientGuid) ``` ```java @SafeVarargs public final SmbConfig.Builder withAuthenticators(Factory.Named... authenticators) ``` ```java public SmbConfig.Builder withAuthenticators(java.lang.Iterable> authenticators) ``` ```java public SmbConfig.Builder withSigningRequired(boolean signingRequired) ``` ```java public SmbConfig.Builder withReadBufferSize(int readBufferSize) ``` ```java public SmbConfig.Builder withReadTimeout(long timeout, java.util.concurrent.TimeUnit timeoutUnit) ``` ```java public SmbConfig.Builder withWriteBufferSize(int writeBufferSize) ``` ```java public SmbConfig.Builder withWriteTimeout(long timeout, java.util.concurrent.TimeUnit timeoutUnit) ``` ```java public SmbConfig.Builder withTransactBufferSize(int transactBufferSize) ``` -------------------------------- ### Constructor Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/msfscc/fileinformation/FileRenameInformation.html Constructor for initializing FileRenameInformation with replacement settings, root directory, and file name. ```java public FileRenameInformation​(boolean replaceIfExists, long rootDirectory, java.lang.String fileName) ``` -------------------------------- ### Iterating Over SMB2MessageCommandCode Constants Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/SMB2MessageCommandCode.html Example of how to iterate over all defined command codes using the values() method. ```java public static SMB2MessageCommandCode[] values() ``` ```java for (SMB2MessageCommandCode c : SMB2MessageCommandCode.values()) System.out.println(c); ``` -------------------------------- ### createDefaultConfig Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/SmbConfig.html Creates and returns a new SmbConfig instance populated with default settings. ```APIDOC ## public static SmbConfig createDefaultConfig() ### Description Creates a new SmbConfig object initialized with the library's default configuration values. ### Returns - **SmbConfig** - A default configuration instance. ``` -------------------------------- ### get() Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/protocol/commons/concurrent/PromiseBackedFuture.html Waits if necessary for the computation to complete, and then retrieves its result. ```APIDOC ## Method: get ### Description Waits if necessary for the computation to complete, and then retrieves its result. ### Returns - **V** - The computed result. ### Throws - **java.util.concurrent.ExecutionException** - If the computation threw an exception. ``` -------------------------------- ### Constructor Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/msdfsc/messages/SMB2GetDFSReferralResponse.html Constructor for initializing the response with the original path. ```java public SMB2GetDFSReferralResponse​(java.lang.String originalPath) ``` -------------------------------- ### get() Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/protocol/commons/concurrent/TransformedFuture.html Waits if necessary for the computation to complete, and then retrieves its result. ```APIDOC ## Method: get ### Description Waits if necessary for the computation to complete, and then retrieves its result. ### Returns - **V** - The transformed result. ### Throws - **InterruptedException** - If the current thread was interrupted while waiting. - **ExecutionException** - If the computation threw an exception. ``` -------------------------------- ### Open Directory Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/share/DiskShare.html Opens a directory at the specified path. ```java public Directory openDirectory​(java.lang.String path, java.util.Set accessMask, java.util.Set attributes, java.util.Set shareAccesses, SMB2CreateDisposition createDisposition, java.util.Set createOptions) ``` -------------------------------- ### Get Negotiate Flags Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/ntlm/messages/NtlmChallenge.html Retrieves the set of negotiate flags. ```java public java.util.EnumSet getNegotiateFlags() ``` -------------------------------- ### SMBClient.connect(String) Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/index-all.html Connects to a host using the SMB client. ```APIDOC ## connect(String) ### Description Connect to the host at the specified address. ### Method Method ### Parameters - **hostname** (String) - Required - The address of the host to connect to. ``` -------------------------------- ### SMB2NegotiateRequest Constructor Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/messages/SMB2NegotiateRequest.html Constructor for initializing a new SMB2NegotiateRequest with specified dialects, client GUID, signing requirements, capabilities, and salt. ```java public SMB2NegotiateRequest​(java.util.Set dialects, java.util.UUID clientGuid, boolean clientSigningRequired, java.util.Set capabilities, byte[] salt) ``` -------------------------------- ### Get File Information by Path Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/share/DiskShare.html Retrieves file information for a specified path. Throws SMBApiException on failure. ```java public FileAllInformation getFileInformation​(java.lang.String path) throws SMBApiException ``` ```java public  F getFileInformation​(java.lang.String path, java.lang.Class informationClass) throws SMBApiException ``` -------------------------------- ### SMB2GetDFSReferralExRequest Constructors Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/msdfsc/messages/SMB2GetDFSReferralExRequest.html Constructors for initializing the request with a path or a path and site. ```java public SMB2GetDFSReferralExRequest​(java.lang.String path) ``` ```java public SMB2GetDFSReferralExRequest​(java.lang.String path, java.lang.String site) ``` -------------------------------- ### Get Server Challenge Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/ntlm/messages/NtlmChallenge.html Retrieves the server challenge bytes. ```java public byte[] getServerChallenge() ``` -------------------------------- ### Iterate Over SMB2Dialect Constants Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/SMB2Dialect.html Example usage of the values() method to iterate through all defined dialects. ```java for (SMB2Dialect c : SMB2Dialect.values()) System.out.println(c); ``` -------------------------------- ### Iterate Over SMB2SecurityMode Constants Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/messages/SMB2SessionSetup.SMB2SecurityMode.html Example of how to iterate over the enum constants using the values() method. ```java public static SMB2SessionSetup.SMB2SecurityMode[] values() ``` ```java for (SMB2SessionSetup.SMB2SecurityMode c : SMB2SessionSetup.SMB2SecurityMode.values())   System.out.println(c); ``` -------------------------------- ### open(String name, ...) Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/share/PipeShare.html Opens a named pipe on the SMB share with the specified access and creation parameters. ```APIDOC ## NamedPipe open(String name, SMB2ImpersonationLevel impersonationLevel, Set accessMask, Set attributes, Set shareAccesses, SMB2CreateDisposition createDisposition, Set createOptions) ### Description Opens a connection to a named pipe on the SMB share. ### Parameters - **name** (String) - The name of the pipe. - **impersonationLevel** (SMB2ImpersonationLevel) - The impersonation level for the connection. - **accessMask** (Set) - The access rights requested. - **attributes** (Set) - File attributes for the pipe. - **shareAccesses** (Set) - Share access modes. - **createDisposition** (SMB2CreateDisposition) - The action to take if the pipe exists or does not exist. - **createOptions** (Set) - Options for creating the pipe connection. ### Returns - **NamedPipe** - The opened pipe instance. ``` -------------------------------- ### Get Cipher List Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/messages/negotiate/SMB2EncryptionCapabilities.html Retrieves the list of encryption ciphers. ```java public java.util.List getCipherList() ``` -------------------------------- ### DiskShare Constructor Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/share/DiskShare.html Initializes a new DiskShare instance. ```java public DiskShare​(SmbPath smbPath, TreeConnect treeConnect, PathResolver pathResolver) ``` -------------------------------- ### create Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/protocol/commons/Factory.Named.Util.html Creates an object by picking a factory from the provided list that matches the specified name. ```APIDOC ## static T create(List> factories, String name) ### Description Creates an object by picking a factory from `factories` that is identified by `name`. Uses the first match found in the list. ### Parameters - **factories** (List>) - Required - List of available factories. - **name** (String) - Required - Name of the desired factory. ### Returns - **T** - A newly created instance of T, or null if no match is found. ``` -------------------------------- ### Get signature Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/SMB2PacketHeader.html Retrieves the signature of the packet as a byte array. ```java public byte[] getSignature() ``` -------------------------------- ### Get Version Method Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/ntlm/messages/NtlmAuthenticate.html Retrieves the version information as defined in MS-NLMP 2.2.2.10. ```java public byte[] getVersion() ``` -------------------------------- ### Get Target Offset Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/copy/CopyChunkRequest.Chunk.html Retrieves the target offset of the chunk. ```java public long getTgtOffset() ``` -------------------------------- ### Getter Methods Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/server/Server.html Methods to retrieve server configuration details. ```APIDOC ## Methods: Getters ### Description Retrieves various configuration properties of the server instance. ### Methods - **getServerName()** (String) - Returns the server name. - **getPort()** (int) - Returns the server port. - **getServerGUID()** (UUID) - Returns the server GUID. - **getDialectRevision()** (SMB2Dialect) - Returns the configured SMB2 dialect. - **getSecurityMode()** (int) - Returns the security mode. - **getCapabilities()** (Set) - Returns the set of enabled capabilities. ``` -------------------------------- ### Get Source Offset Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/copy/CopyChunkRequest.Chunk.html Retrieves the source offset of the chunk. ```java public long getSrcOffset() ``` -------------------------------- ### init(DerivationParameters parameters) Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/security/DerivationFunction.html Initializes the derivation function with the provided parameters. ```APIDOC ## void init(DerivationParameters parameters) ### Description Initializes the derivation function with the specified derivation parameters. ### Parameters - **parameters** (DerivationParameters) - The parameters required for the derivation process. ``` -------------------------------- ### Get Information Class Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/msfscc/fileinformation/FileInformation.Decoder.html Retrieves the FileInformationClass associated with the decoder. ```java FileInformationClass getInformationClass() ``` -------------------------------- ### SMB2QueryDirectoryRequest Constructor Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/messages/SMB2QueryDirectoryRequest.html Constructor for initializing a new SMB2QueryDirectoryRequest with necessary SMB2 session and file information. ```java public SMB2QueryDirectoryRequest​(SMB2Dialect smbDialect, long sessionId, long treeId, SMB2FileId fileId, FileInformationClass fileInformationClass, java.util.Set flags, long fileIndex, java.lang.String searchPattern, int maxBufferSize) ``` -------------------------------- ### Get Allocation Size Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/msfscc/fileinformation/FileDirectoryInformation.html Retrieves the allocation size of the file. ```java public long getAllocationSize() ``` -------------------------------- ### Register Server Method Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/server/ServerList.html Registers a new server instance. ```java public void registerServer​(Server server) ``` -------------------------------- ### Get End of File Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/msfscc/fileinformation/FileDirectoryInformation.html Retrieves the end of file position. ```java public long getEndOfFile() ``` -------------------------------- ### Get Change Time Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/msfscc/fileinformation/FileDirectoryInformation.html Retrieves the change time of the file. ```java public FileTime getChangeTime() ``` -------------------------------- ### createSession(AuthenticationContext context) Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/connection/SMBSessionBuilder.SessionFactory.html Creates a new SMB session using the provided authentication context. ```APIDOC ## Session createSession(AuthenticationContext context) ### Description Creates a new SMB session using the provided authentication context. ### Parameters - **context** (AuthenticationContext) - Required - The authentication context to use for the session creation. ### Returns - **Session** - The created SMB session. ``` -------------------------------- ### Get Creation Time Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/msfscc/fileinformation/FileDirectoryInformation.html Retrieves the creation time of the file. ```java public FileTime getCreationTime() ``` -------------------------------- ### SmbConfig.Builder Methods Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/SmbConfig.Builder.html The Builder class provides various methods to configure the SMB client. Each method returns the builder instance for method chaining. ```APIDOC ## SmbConfig.Builder Methods ### build() Constructs and returns a new SmbConfig instance based on the configured parameters. ### withRandomProvider(java.util.Random random) Sets the random provider for the SMB client. ### withSecurityProvider(SecurityProvider securityProvider) Sets the security provider for the SMB client. ### withSocketFactory(javax.net.SocketFactory socketFactory) Sets the socket factory to be used for creating connections. ### withDialects(SMB2Dialect... dialects) Sets the supported SMB2 dialects. ### withClientGuid(java.util.UUID clientGuid) Sets the client GUID for the SMB session. ### withAuthenticators(Factory.Named... authenticators) Sets the authenticators to be used for authentication. ### withSigningRequired(boolean signingRequired) Configures whether packet signing is required. ### withReadBufferSize(int readBufferSize) Sets the buffer size for read operations. ### withReadTimeout(long timeout, java.util.concurrent.TimeUnit timeoutUnit) Sets the timeout for read operations. ### withWriteBufferSize(int writeBufferSize) Sets the buffer size for write operations. ### withWriteTimeout(long timeout, java.util.concurrent.TimeUnit timeoutUnit) Sets the timeout for write operations. ### withTransactBufferSize(int transactBufferSize) Sets the buffer size for transaction operations. ``` -------------------------------- ### Get Access Mask Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/msdtyp/ace/ACE.html Retrieves the access mask for this ACE. ```java public abstract long getAccessMask() ``` -------------------------------- ### mkdir Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/share/DiskShare.html Creates a new directory at the specified path. ```APIDOC ## DiskShare.mkdir ### Description Creates a directory in the given path. ### Signature `public void mkdir(java.lang.String path) throws SMBApiException` ``` -------------------------------- ### Get ACE Header Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/msdtyp/ace/ACE.html Retrieves the AceHeader associated with this ACE. ```java public AceHeader getAceHeader() ``` -------------------------------- ### Retrieve Output Stream with Progress Listener Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/share/SMB2Writer.html Returns an output stream with a specified progress listener and starting offset. ```java public java.io.OutputStream getOutputStream​(ProgressListener listener, long offset) ``` -------------------------------- ### SMB2SessionSetup Accessor Methods Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/messages/SMB2SessionSetup.html Methods for retrieving and setting session-related information. ```java public java.util.Set getSessionFlags() ``` ```java public void setPreviousSessionId​(long previousSessionId) ``` ```java public void setSecurityBuffer​(byte[] securityBuffer) ``` ```java public byte[] getSecurityBuffer() ``` -------------------------------- ### Iterate Over Enum Constants Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/messages/SMB2SessionSetup.SMB2SessionFlags.html Example of iterating over all defined session flags. ```java for (SMB2SessionSetup.SMB2SessionFlags c : SMB2SessionSetup.SMB2SessionFlags.values()) System.out.println(c); ``` -------------------------------- ### ServerList Constructor Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/server/ServerList.html Constructor for initializing a new ServerList instance. ```java public ServerList() ``` -------------------------------- ### Manage Server Instance Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/connection/ConnectionContext.html Methods to retrieve or set the server associated with the connection context. ```java public Server getServer() ``` ```java public void setServer​(Server server) ``` -------------------------------- ### supportsDirectoryLeasing() Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/connection/ConnectionContext.html Checks if the connection supports directory leasing for SMB 3.x dialects. ```APIDOC ### Method `public boolean supportsDirectoryLeasing()` ### Description Returns true if the connection supports directory leasing, based on the SMB2_GLOBAL_CAP_DIRECTORY_LEASING capability for SMB 3.x dialects. ``` -------------------------------- ### SequenceWindow Constructor Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/connection/SequenceWindow.html Initializes a new instance of the SequenceWindow class. ```java public SequenceWindow() ``` -------------------------------- ### Buffer.wpos Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/index-all.html Methods to get or set the current writing position of a buffer. ```APIDOC ## wpos() ### Description Returns the current writing position of this buffer. ## wpos(int) ### Description Set the current writing position. ``` -------------------------------- ### SMB1PacketFactory() Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb/SMB1PacketFactory.html Constructs a new instance of the SMB1PacketFactory. ```APIDOC ## SMB1PacketFactory() ### Description Constructs a new SMB1PacketFactory object. ### Signature `public SMB1PacketFactory()` ``` -------------------------------- ### Response Token Accessors Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/spnego/NegTokenTarg.html Methods to get and set the response token. ```java public byte[] getResponseToken() ``` ```java public void setResponseToken​(byte[] responseToken) ``` -------------------------------- ### Constructor Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/msfscc/fileinformation/FileAllocationInformation.html Constructor for initializing FileAllocationInformation with an allocation size. ```java public FileAllocationInformation​(long allocationSize) ``` -------------------------------- ### Supported Mechanism Accessors Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/spnego/NegTokenTarg.html Methods to get and set the supported mechanism. ```java public com.hierynomus.asn1.types.primitive.ASN1ObjectIdentifier getSupportedMech() ``` ```java public void setSupportedMech​(com.hierynomus.asn1.types.primitive.ASN1ObjectIdentifier supportedMech) ``` -------------------------------- ### SMBClient Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/package-summary.html The SMBClient class serves as the main entry point for the SMBJ library, allowing users to initiate and manage Server Message Block connections. ```APIDOC ## SMBClient ### Description The SMBClient class is the primary interface for interacting with SMB servers using the SMBJ library. It provides the necessary functionality to establish connections and perform operations within the SMB protocol context. ``` -------------------------------- ### Negotiation Result Accessors Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/spnego/NegTokenTarg.html Methods to get and set the negotiation result. ```java public java.math.BigInteger getNegotiationResult() ``` ```java public void setNegotiationResult​(java.math.BigInteger negotiationResult) ``` -------------------------------- ### Get Share Information Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/share/DiskShare.html Retrieves the ShareInfo for the current Disk Share. ```java public ShareInfo getShareInformation() throws SMBApiException ``` -------------------------------- ### Constructor Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb/messages/SMB1ComNegotiateRequest.html Constructor for initializing a new SMB1ComNegotiateRequest with a set of dialects. ```java public SMB1ComNegotiateRequest​(java.util.Set dialects) ``` -------------------------------- ### Get DiskEntry Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/share/DiskShare.html Retrieves a DiskEntry based on the provided response context. ```java protected DiskEntry getDiskEntry​(com.hierynomus.smbj.share.DiskShare.SMB2CreateResponseContext responseContext) ``` -------------------------------- ### SMB2GetDFSReferralRequest Constructor Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/msdfsc/messages/SMB2GetDFSReferralRequest.html Constructor for initializing the request with a specific path. ```java public SMB2GetDFSReferralRequest​(java.lang.String path) ``` -------------------------------- ### establish(AuthenticationContext) Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/connection/SMBSessionBuilder.html Establishes a new session on the connection using the provided authentication context. ```APIDOC ## Method: establish ### Description Establish a new session on the connection using the passed credentials. ### Parameters - **authContext** (AuthenticationContext) - The credentials used for authentication. ### Returns - **Session** - A new Session that is authenticated for the user. ``` -------------------------------- ### Get Hash Code Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/share/Share.html Returns the hash code for the Share object. ```java public int hashCode() ``` -------------------------------- ### registerServer(Server server) Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/server/ServerList.html Registers a new server instance. ```APIDOC ## Method: registerServer(Server server) ### Description Registers a server instance with the list. ### Signature `public void registerServer(Server server)` ### Parameters - **server** (Server) - The server instance to register. ``` -------------------------------- ### Get File Information Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/share/DiskEntry.html Retrieves file information of a specific type. ```java public F getFileInformation​(java.lang.Class informationClass) throws SMBApiException ``` -------------------------------- ### Constructor Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/SMB2PacketHeader.html Default constructor for the SMB2PacketHeader. ```java public SMB2PacketHeader() ``` -------------------------------- ### Get Server Port Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/server/Server.html Retrieves the port number the server is bound to. ```java public int getPort() ``` -------------------------------- ### open Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/share/DiskShare.html Opens a file or directory on the share with specified access masks, attributes, and creation options. ```APIDOC ## DiskShare.open ### Description Opens a file or directory on the share. ### Signature `public DiskEntry open(java.lang.String path, java.util.Set accessMask, java.util.Set attributes, java.util.Set shareAccesses, SMB2CreateDisposition createDisposition, java.util.Set createOptions)` ``` -------------------------------- ### Get Time Offset Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/connection/ConnectionContext.html Retrieves the time offset in milliseconds for the connection. ```java public java.lang.Long getTimeOffsetMillis() ``` -------------------------------- ### Connection Constructors Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/connection/Connection.html Constructors for initializing a new Connection instance. ```java public Connection​(SmbConfig config, SMBClient client, SMBEventBus bus, ServerList serverList) ``` ```java public Connection​(Connection connection) ``` -------------------------------- ### Get Digest Length Method Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/security/jce/JceMessageDigest.html Returns the length of the digest in bytes. ```java public int getDigestLength() ``` -------------------------------- ### Initialize GSSContextConfig Builder Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/GSSContextConfig.html Initializes a builder for creating GSSContextConfig instances. ```java public static GSSContextConfig.Builder builder() ``` -------------------------------- ### Get string representation Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/protocol/commons/concurrent/Promise.html Returns the string representation of the promise object. ```java public java.lang.String toString() ``` -------------------------------- ### Open File Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/share/DiskShare.html Opens a file at the specified path. ```java public File openFile​(java.lang.String path, java.util.Set accessMask, java.util.Set attributes, java.util.Set shareAccesses, SMB2CreateDisposition createDisposition, java.util.Set createOptions) ``` -------------------------------- ### get Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/protocol/commons/Factory.Named.Util.html Retrieves a specific factory from the list based on the provided name. ```APIDOC ## static Factory.Named get(List> factories, String name) ### Description Retrieve a particular factory as identified by `name` from a list of named `factories`. Returns the first match. ### Parameters - **factories** (List>) - Required - List of factories. - **name** (String) - Required - The name of the factory to retrieve. ### Returns - **Factory.Named** - A factory or null if there was no match. ``` -------------------------------- ### Get Target Name Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/ntlm/messages/NtlmChallenge.html Retrieves the target name from the NTLM challenge. ```java public java.lang.String getTargetName() ``` -------------------------------- ### SMB2SessionSetup Constructors Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/messages/SMB2SessionSetup.html Constructors for initializing the SMB2SessionSetup packet. ```java public SMB2SessionSetup() ``` ```java public SMB2SessionSetup​(SMB2Dialect negotiatedDialect, java.util.Set securityMode, java.util.Set capabilities) ``` -------------------------------- ### Get Negotiate Context Type Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/messages/negotiate/SMB2NegotiateContext.html Retrieves the type of the negotiate context. ```java public SMB2NegotiateContextType getNegotiateContextType() ``` -------------------------------- ### SmbPath Constructor Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/common/SmbPath.html Constructs a new SmbPath instance using various combinations of hostname, share name, and path components. ```APIDOC ## Constructor: SmbPath(String hostname, String shareName, String path) ### Description Creates a new SmbPath instance with the specified hostname, share name, and path. ### Parameters - **hostname** (String) - The host name. - **shareName** (String) - The share name. - **path** (String) - The path within the share. ``` -------------------------------- ### SMB2NegotiateRequest Constructor Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/messages/SMB2NegotiateRequest.html Initializes a new instance of the SMB2NegotiateRequest class. ```APIDOC ## Constructor: SMB2NegotiateRequest ### Description Constructs a new SMB2 Negotiate Request packet with the specified configuration parameters. ### Signature `public SMB2NegotiateRequest(java.util.Set dialects, java.util.UUID clientGuid, boolean clientSigningRequired, java.util.Set capabilities, byte[] salt)` ### Parameters - **dialects** (java.util.Set) - The set of SMB2 dialects supported by the client. - **clientGuid** (java.util.UUID) - The unique identifier for the client. - **clientSigningRequired** (boolean) - Indicates whether client signing is required. - **capabilities** (java.util.Set) - The set of global capabilities supported by the client. - **salt** (byte[]) - The salt value used for the negotiation. ``` -------------------------------- ### Get File ID Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/messages/SMB2CreateResponse.html Retrieves the file ID associated with the response. ```java public SMB2FileId getFileId() ``` -------------------------------- ### GSSContextConfig.builder() Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/GSSContextConfig.html Initializes a builder for creating a custom GSSContextConfig instance. ```APIDOC ## GSSContextConfig.builder() ### Description Returns a builder instance used to construct a custom GSSContextConfig. ### Signature `public static GSSContextConfig.Builder builder()` ### Returns - **GSSContextConfig.Builder** - A builder instance for GSSContextConfig. ``` -------------------------------- ### Get credit charge Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/SMB2PacketHeader.html Retrieves the credit charge associated with the packet. ```java public int getCreditCharge() ``` -------------------------------- ### Get Message End Position Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb/SMB1Header.html Retrieves the ending position of the message. ```java public int getMessageEndPosition() ``` -------------------------------- ### Constructor Definition Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/SMB2MultiCreditPacket.html Constructor for initializing an SMB2MultiCreditPacket with specific SMB2 parameters. ```java public SMB2MultiCreditPacket​(int structureSize, SMB2Dialect dialect, SMB2MessageCommandCode messageType, long sessionId, long treeId, int maxPayloadSize) ``` -------------------------------- ### Get File Attributes Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/msfscc/fileinformation/FileDirectoryInformation.html Retrieves the file attributes as a long value. ```java public long getFileAttributes() ``` -------------------------------- ### Constructor Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/messages/SMB2QueryDirectoryResponse.html Default constructor for the SMB2QueryDirectoryResponse class. ```java public SMB2QueryDirectoryResponse() ``` -------------------------------- ### SecurityDescriptor String Representation Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/msdtyp/SecurityDescriptor.html Method to get the string representation of the SecurityDescriptor. ```java public java.lang.String toString() ``` -------------------------------- ### Constructors Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/messages/negotiate/SMB2EncryptionCapabilities.html Constructors for initializing SMB2EncryptionCapabilities with or without a cipher list. ```java public SMB2EncryptionCapabilities() ``` ```java public SMB2EncryptionCapabilities​(java.util.List cipherList) ``` -------------------------------- ### Get SID Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/msdtyp/ace/ACE.html Retrieves the Security Identifier (SID) associated with this ACE. ```java public abstract SID getSid() ``` -------------------------------- ### init Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/security/Cipher.html Initializes the cipher with a specific cryptographic mode and key material. ```APIDOC ## void init(Cipher.CryptMode cryptMode, byte[] bytes) ### Description Initializes the cipher instance with the specified cryptographic mode and key bytes. ### Parameters - **cryptMode** (Cipher.CryptMode) - Required - The mode of operation (e.g., ENCRYPT or DECRYPT). - **bytes** (byte[]) - Required - The key material used for initialization. ### Throws - **SecurityException** - Thrown if initialization fails. ``` -------------------------------- ### getCompressionAlgorithms() Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/messages/negotiate/SMB2CompressionCapabilities.html Retrieves the list of supported compression algorithms. ```APIDOC ## getCompressionAlgorithms() ### Description Returns the list of compression algorithms supported by the SMB2 compression capabilities. ### Returns - **List** - A list of supported compression algorithms. ``` -------------------------------- ### Iterating over SMB2ShareFlags Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/SMB2ShareFlags.html Example of how to iterate over the enum constants using the values() method. ```java public static SMB2ShareFlags[] values() ``` ```java for (SMB2ShareFlags c : SMB2ShareFlags.values()) System.out.println(c); ``` -------------------------------- ### Iterate Over Enum Constants Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/SMB2ShareAccess.html Example of how to iterate over all defined constants in the SMB2ShareAccess enum. ```java for (SMB2ShareAccess c : SMB2ShareAccess.values()) System.out.println(c); ``` -------------------------------- ### getMac Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/security/SecurityProvider.html Retrieves a Mac instance by name. ```APIDOC ## Mac getMac(String name) ### Description Retrieves a Mac (Message Authentication Code) instance based on the provided algorithm name. ### Parameters - **name** (String) - The name of the MAC algorithm. ### Throws - **SecurityException** - If the MAC instance cannot be retrieved. ``` -------------------------------- ### create() Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/auth/SpnegoAuthenticator.Factory.html Creates a new SpnegoAuthenticator instance. ```APIDOC ## Method: create() ### Description Creates and returns a new SpnegoAuthenticator object. ### Returns - **SpnegoAuthenticator** - A new object created using this factory. ``` -------------------------------- ### Iterating over Enum Constants Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/msdtyp/SecurityDescriptor.Control.html Example showing how to iterate over the values of the SecurityDescriptor.Control enum. ```java public static SecurityDescriptor.Control[] values() Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows: for (SecurityDescriptor.Control c : SecurityDescriptor.Control.values()) System.out.println(c); ``` -------------------------------- ### Establish SMB Session Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/connection/SMBSessionBuilder.html Establishes a new authenticated session on the connection using the provided authentication context. ```java public Session establish​(AuthenticationContext authContext) ``` -------------------------------- ### Create Default GSSContextConfig Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/GSSContextConfig.html Creates a default instance of GSSContextConfig. ```java public static GSSContextConfig createDefaultConfig() ``` -------------------------------- ### Iterating over AceObjectFlags Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/msdtyp/ace/AceObjectFlags.html Example usage of the values() method to iterate over enum constants. ```java for (AceObjectFlags c : AceObjectFlags.values())   System.out.println(c); ``` -------------------------------- ### SMBSessionBuilder(Connection, SmbConfig, SessionFactory) Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/connection/SMBSessionBuilder.html Constructs a new SMBSessionBuilder instance. ```APIDOC ## Constructor: SMBSessionBuilder ### Description Constructs a new SMBSessionBuilder with the specified connection, configuration, and session factory. ### Parameters - **connection** (Connection) - The SMB connection. - **config** (SmbConfig) - The SMB configuration. - **sessionFactory** (SMBSessionBuilder.SessionFactory) - The factory used to create sessions. ``` -------------------------------- ### Get Create Status Handler Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/share/DiskShare.html Retrieves the status handler for create operations. ```java protected StatusHandler getCreateStatusHandler() ``` -------------------------------- ### Constructor Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/connection/packet/SMB2CreditGrantingPacketHandler.html Constructor for initializing the handler with a SequenceWindow. ```java public SMB2CreditGrantingPacketHandler​(SequenceWindow sequenceWindow) ``` -------------------------------- ### GSSContextConfig.createDefaultConfig() Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/GSSContextConfig.html Creates a new GSSContextConfig instance with default settings. ```APIDOC ## GSSContextConfig.createDefaultConfig() ### Description Creates and returns a new GSSContextConfig object initialized with default values. ### Signature `public static GSSContextConfig createDefaultConfig()` ### Returns - **GSSContextConfig** - A default configuration instance. ``` -------------------------------- ### Factory and Read Methods Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/messages/negotiate/SMB2NegotiateContext.html Methods for creating or reading SMB2NegotiateContext instances from a buffer. ```java public static SMB2NegotiateContext factory​(SMBBuffer buffer) throws Buffer.BufferException ``` ```java public final SMB2NegotiateContext read​(SMBBuffer buffer) throws Buffer.BufferException ``` ```java protected void readContext​(SMBBuffer buffer, int dataSize) throws Buffer.BufferException ``` -------------------------------- ### Get Dialect Revision Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/server/Server.html Retrieves the SMB2 dialect revision currently in use. ```java public SMB2Dialect getDialectRevision() ``` -------------------------------- ### Get Session ID Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/event/SessionLoggedOff.html Retrieves the session ID associated with the logoff event. ```java public long getSessionId() ``` -------------------------------- ### FileByteChunkProvider Constructors Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/io/FileByteChunkProvider.html Constructors for initializing a FileByteChunkProvider with a file and an optional offset. ```java public FileByteChunkProvider​(java.io.File file) throws java.io.IOException ``` ```java public FileByteChunkProvider​(java.io.File file, long offset) throws java.io.IOException ``` -------------------------------- ### Get Connection Details Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/event/ConnectionClosed.html Methods to retrieve the hostname and port of the closed connection. ```java public java.lang.String getHostname() ``` ```java public int getPort() ``` -------------------------------- ### Connect to a Share Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/session/Session.html Establishes a connection to a specific share on the remote machine using the current session. ```java public Share connectShare(java.lang.String shareName) ``` -------------------------------- ### ArrayByteChunkProvider Constructors Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/io/ArrayByteChunkProvider.html Constructors for initializing the provider with byte data and file offsets. ```java public ArrayByteChunkProvider(byte[] data, long fileOffset) ``` ```java public ArrayByteChunkProvider(byte[] data, int offset, int length, long fileOffset) ``` -------------------------------- ### builder Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/SmbConfig.html Returns a builder instance to construct a custom SmbConfig. ```APIDOC ## public static SmbConfig.Builder builder() ### Description Initializes a new SmbConfig.Builder to allow for the customization of SMB client configuration parameters. ### Returns - **SmbConfig.Builder** - A builder instance for SmbConfig. ``` -------------------------------- ### SMB1PacketData Constructor Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb/SMB1PacketData.html Constructor for initializing SMB1PacketData with a byte array, potentially throwing a Buffer.BufferException. ```java public SMB1PacketData​(byte[] data) throws Buffer.BufferException ``` -------------------------------- ### Get Data Method Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/messages/SMB2ReadResponse.html Retrieves the raw byte array of the response data. ```java public byte[] getData() ``` -------------------------------- ### Session Constructor Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/session/Session.html Initializes a new Session instance with the required connection, configuration, and security components. ```java public Session(Connection connection, SmbConfig config, AuthenticationContext userCredentials, SMBEventBus bus, PathResolver pathResolver, PacketSignatory signatory, PacketEncryptor encryptor) ``` -------------------------------- ### Get Data Length Method Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/messages/SMB2ReadResponse.html Retrieves the length of the data contained in the response. ```java public int getDataLength() ``` -------------------------------- ### Get File Attributes Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/mssmb2/messages/SMB2CreateResponse.html Retrieves the file attributes set on the created file. ```java public java.util.Set getFileAttributes() ``` -------------------------------- ### Constructor Definition Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/io/EmptyByteChunkProvider.html Constructor for initializing an EmptyByteChunkProvider with a specific file offset. ```java public EmptyByteChunkProvider​(long fileOffset) ``` -------------------------------- ### SMB2AsyncResponsePacketHandler Constructor Source: https://www.javadoc.io/doc/com.hierynomus/smbj/0.11.3/com/hierynomus/smbj/connection/packet/SMB2AsyncResponsePacketHandler.html Constructor for initializing the handler with outstanding requests. ```java public SMB2AsyncResponsePacketHandler​(OutstandingRequests outstandingRequests) ```