Class SMB2LeaseResponseContext
java.lang.Object
com.hierynomus.mssmb2.messages.create.SMB2LeaseResponseContext
Parses the
RqLs lease create-context response payload. V1 (32B) vs V2 (52B)
is disambiguated solely by the data length (V1 and V2 share the identical "RqLs"
4CC). Exposes the server-granted lease state, key, and (V2) parent key + epoch.-
Method Summary
Modifier and TypeMethodDescriptionstatic SMB2LeaseResponseContextfrom(SMB2CreateContext ctx) Convenience over an already-located "RqLs" create context (spec-01 readAll).intgetEpoch()The server lease epoch (V2 only), else 0.longgetFlags()longThe parent lease key (V2 only), elsenull.booleanbooleanisV2()static SMB2LeaseResponseContextread(byte[] data) Parse the inner data blob; V1/V2 chosen strictly bydata.length(32 vs 52).
-
Method Details
-
read
Parse the inner data blob; V1/V2 chosen strictly bydata.length(32 vs 52).- Throws:
Buffer.BufferException
-
from
Convenience over an already-located "RqLs" create context (spec-01 readAll).- Throws:
Buffer.BufferException
-
isV2
public boolean isV2() -
getLeaseKey
-
getLeaseState
public long getLeaseState() -
getFlags
public long getFlags() -
isReadHandleGranted
public boolean isReadHandleGranted() -
getParentLeaseKey
The parent lease key (V2 only), elsenull. -
getEpoch
public int getEpoch()The server lease epoch (V2 only), else 0.
-