Class VolumeInfo
- java.lang.Object
-
- com.hierynomus.msfscc.fileinformation.VolumeInfo
-
public class VolumeInfo extends java.lang.Object
Class containing information about a volume
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
supportsObjects
Set to TRUE if the file system supports object-oriented file system objects; set to FALSE otherwise.private FileTime
volumeCreationTime
The time when the volume was created.private java.lang.String
volumeLabel
A field containing the name of the volume.private int
volumeSerialNumber
The serial number is an opaque value generated by the file system at format time, and is not necessarily related to any hardware serial number for the device on which the file system is located.
-
Constructor Summary
Constructors Constructor Description VolumeInfo(FileTime volumeCreationTime, int volumeSerialNumber, boolean supportsObjects, java.lang.String volumeLabel)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description FileTime
getVolumeCreationTime()
Gets the time when the volume was created.java.lang.String
getVolumeLabel()
Gets the field containing the name of the volume.int
getVolumeSerialNumber()
Gets the serial number is an opaque value generated by the file system at format time, and is not necessarily related to any hardware serial number for the device on which the file system is located.boolean
isSupportsObjects()
Are object-oriented file system objects supportedstatic VolumeInfo
parseFileFsVolumeInformation(Buffer.PlainBuffer buffer)
Parses the volume information from a given buffer [MS-SMB2] 2.2.38 SMB2 QUERY_INFO Response, SMB2_0_INFO_FILESYSTEM/FileFsVolumeInformationjava.lang.String
toString()
-
-
-
Field Detail
-
volumeCreationTime
private final FileTime volumeCreationTime
The time when the volume was created.
-
volumeSerialNumber
private final int volumeSerialNumber
The serial number is an opaque value generated by the file system at format time, and is not necessarily related to any hardware serial number for the device on which the file system is located. No specific format or content of this field is required for protocol interoperation. This value is not required to be unique.
-
supportsObjects
private final boolean supportsObjects
Set to TRUE if the file system supports object-oriented file system objects; set to FALSE otherwise.
-
volumeLabel
private final java.lang.String volumeLabel
A field containing the name of the volume.
-
-
Constructor Detail
-
VolumeInfo
VolumeInfo(FileTime volumeCreationTime, int volumeSerialNumber, boolean supportsObjects, java.lang.String volumeLabel)
-
-
Method Detail
-
parseFileFsVolumeInformation
public static VolumeInfo parseFileFsVolumeInformation(Buffer.PlainBuffer buffer) throws Buffer.BufferException
Parses the volume information from a given buffer [MS-SMB2] 2.2.38 SMB2 QUERY_INFO Response, SMB2_0_INFO_FILESYSTEM/FileFsVolumeInformation[MS-FSCC] 2.5.9 FileFsVolumeInformation for SMB2
- Throws:
Buffer.BufferException
-
getVolumeCreationTime
public FileTime getVolumeCreationTime()
Gets the time when the volume was created.- Returns:
- the time when the volume was created
-
getVolumeSerialNumber
public int getVolumeSerialNumber()
Gets the serial number is an opaque value generated by the file system at format time, and is not necessarily related to any hardware serial number for the device on which the file system is located. No specific format or content of this field is required for protocol interoperation. This value is not required to be unique.- Returns:
- the volume serial number
-
isSupportsObjects
public boolean isSupportsObjects()
Are object-oriented file system objects supported- Returns:
- true if the file system supports object-oriented file system objects; false otherwise
-
getVolumeLabel
public java.lang.String getVolumeLabel()
Gets the field containing the name of the volume.- Returns:
- the volume label
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-