Class FileInformationFactory
- java.lang.Object
-
- com.hierynomus.msfscc.fileinformation.FileInformationFactory
-
public class FileInformationFactory extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
FileInformationFactory.FileInfoIterator<F extends FileDirectoryQueryableInformation>
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Map<java.lang.Class<?>,FileInformation.Decoder<?>>
decoders
private static java.util.Map<java.lang.Class<?>,FileInformation.Encoder<?>>
encoders
-
Constructor Summary
Constructors Modifier Constructor Description private
FileInformationFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <F extends FileDirectoryQueryableInformation>
java.util.Iterator<F>createFileInformationIterator(byte[] data, FileInformation.Decoder<F> decoder)
static <F extends FileInformation>
FileInformation.Decoder<F>getDecoder(java.lang.Class<F> fileInformationClass)
static <F extends FileInformation>
FileInformation.Encoder<F>getEncoder(F fileInformation)
static <F extends FileInformation>
FileInformation.Encoder<F>getEncoder(java.lang.Class<F> fileInformationClass)
private static FileAccessInformation
parseFileAccessInformation(Buffer<?> buffer)
private static FileAlignmentInformation
parseFileAlignmentInformation(Buffer<?> buffer)
static FileAllInformation
parseFileAllInformation(Buffer<?> buffer)
[MS-SMB2] 2.2.38 SMB2 QUERY_INFO Response, SMB2_0_INFO_FILE/FileAllInformationprivate static FileBasicInformation
parseFileBasicInformation(Buffer<?> buffer)
static FileBothDirectoryInformation
parseFileBothDirectoryInformation(Buffer<?> buffer)
2.4.8 FileBothDirectoryInformationstatic FileDirectoryInformation
parseFileDirectoryInformation(Buffer<?> buffer)
2.4.10 FileDirectoryInformationprivate static FileEaInformation
parseFileEaInformation(Buffer<?> buffer)
static FileFullDirectoryInformation
parseFileFullDirectoryInformation(Buffer<?> buffer)
2.4.14 FileFullDirectoryInformationstatic FileIdBothDirectoryInformation
parseFileIdBothDirectoryInformation(Buffer<?> buffer)
2.4.17 FileIdBothDirectoryInformationstatic FileIdFullDirectoryInformation
parseFileIdFullDirectoryInformation(Buffer<?> buffer)
2.4.18 FileIdFullDirectoryInformationstatic <F extends FileDirectoryQueryableInformation>
java.util.List<F>parseFileInformationList(byte[] data, FileInformation.Decoder<F> decoder)
[MS-SMB2] 2.2.34 SMB2 QUERY_DIRECTORY Response for FileInformationClass->FileIdBothDirectoryInformationprivate static FileInternalInformation
parseFileInternalInformation(Buffer<?> buffer)
private static FileModeInformation
parseFileModeInformation(Buffer<?> buffer)
private static java.lang.String
parseFileNameInformation(Buffer<?> buffer)
static FileNamesInformation
parseFileNamesInformation(Buffer<?> buffer)
2.4.26 FileNamesInformationprivate static FilePositionInformation
parseFilePositionInformation(Buffer<?> buffer)
private static FileStandardInformation
parseFileStandardInformation(Buffer<?> buffer)
private static FileStreamInformation
parseFileStreamInformation(Buffer<?> buffer)
2.4.40 FileStreamInformationstatic void
writeFileRenameInformation(FileRenameInformation information, Buffer<?> buffer)
MS-FSCC 2.4.34.2 FileRenameInformation for SMB2
-
-
-
Field Detail
-
encoders
private static final java.util.Map<java.lang.Class<?>,FileInformation.Encoder<?>> encoders
-
decoders
private static final java.util.Map<java.lang.Class<?>,FileInformation.Decoder<?>> decoders
-
-
Method Detail
-
getEncoder
public static <F extends FileInformation> FileInformation.Encoder<F> getEncoder(F fileInformation)
-
getEncoder
public static <F extends FileInformation> FileInformation.Encoder<F> getEncoder(java.lang.Class<F> fileInformationClass)
-
getDecoder
public static <F extends FileInformation> FileInformation.Decoder<F> getDecoder(java.lang.Class<F> fileInformationClass)
-
parseFileInformationList
public static <F extends FileDirectoryQueryableInformation> java.util.List<F> parseFileInformationList(byte[] data, FileInformation.Decoder<F> decoder)
[MS-SMB2] 2.2.34 SMB2 QUERY_DIRECTORY Response for FileInformationClass->FileIdBothDirectoryInformation- Parameters:
data
-decoder
-- Returns:
-
createFileInformationIterator
public static <F extends FileDirectoryQueryableInformation> java.util.Iterator<F> createFileInformationIterator(byte[] data, FileInformation.Decoder<F> decoder)
-
parseFileAllInformation
public static FileAllInformation parseFileAllInformation(Buffer<?> buffer) throws Buffer.BufferException
[MS-SMB2] 2.2.38 SMB2 QUERY_INFO Response, SMB2_0_INFO_FILE/FileAllInformation[MS-FSCC] 2.4.2 FileAllInformation
- Throws:
Buffer.BufferException
-
parseFileNameInformation
private static java.lang.String parseFileNameInformation(Buffer<?> buffer) throws Buffer.BufferException
- Throws:
Buffer.BufferException
-
parseFileBasicInformation
private static FileBasicInformation parseFileBasicInformation(Buffer<?> buffer) throws Buffer.BufferException
- Throws:
Buffer.BufferException
-
parseFileStandardInformation
private static FileStandardInformation parseFileStandardInformation(Buffer<?> buffer) throws Buffer.BufferException
- Throws:
Buffer.BufferException
-
parseFileInternalInformation
private static FileInternalInformation parseFileInternalInformation(Buffer<?> buffer) throws Buffer.BufferException
- Throws:
Buffer.BufferException
-
parseFileEaInformation
private static FileEaInformation parseFileEaInformation(Buffer<?> buffer) throws Buffer.BufferException
- Throws:
Buffer.BufferException
-
parseFileStreamInformation
private static FileStreamInformation parseFileStreamInformation(Buffer<?> buffer) throws Buffer.BufferException
2.4.40 FileStreamInformation- Throws:
Buffer.BufferException
-
parseFileAccessInformation
private static FileAccessInformation parseFileAccessInformation(Buffer<?> buffer) throws Buffer.BufferException
- Throws:
Buffer.BufferException
-
parseFilePositionInformation
private static FilePositionInformation parseFilePositionInformation(Buffer<?> buffer) throws Buffer.BufferException
- Throws:
Buffer.BufferException
-
parseFileModeInformation
private static FileModeInformation parseFileModeInformation(Buffer<?> buffer) throws Buffer.BufferException
- Throws:
Buffer.BufferException
-
parseFileAlignmentInformation
private static FileAlignmentInformation parseFileAlignmentInformation(Buffer<?> buffer) throws Buffer.BufferException
- Throws:
Buffer.BufferException
-
parseFileBothDirectoryInformation
public static FileBothDirectoryInformation parseFileBothDirectoryInformation(Buffer<?> buffer) throws Buffer.BufferException
2.4.8 FileBothDirectoryInformation- Throws:
Buffer.BufferException
-
parseFileDirectoryInformation
public static FileDirectoryInformation parseFileDirectoryInformation(Buffer<?> buffer) throws Buffer.BufferException
2.4.10 FileDirectoryInformation- Throws:
Buffer.BufferException
-
parseFileFullDirectoryInformation
public static FileFullDirectoryInformation parseFileFullDirectoryInformation(Buffer<?> buffer) throws Buffer.BufferException
2.4.14 FileFullDirectoryInformation- Throws:
Buffer.BufferException
-
parseFileIdBothDirectoryInformation
public static FileIdBothDirectoryInformation parseFileIdBothDirectoryInformation(Buffer<?> buffer) throws Buffer.BufferException
2.4.17 FileIdBothDirectoryInformation- Throws:
Buffer.BufferException
-
parseFileIdFullDirectoryInformation
public static FileIdFullDirectoryInformation parseFileIdFullDirectoryInformation(Buffer<?> buffer) throws Buffer.BufferException
2.4.18 FileIdFullDirectoryInformation- Throws:
Buffer.BufferException
-
parseFileNamesInformation
public static FileNamesInformation parseFileNamesInformation(Buffer<?> buffer) throws Buffer.BufferException
2.4.26 FileNamesInformation- Throws:
Buffer.BufferException
-
writeFileRenameInformation
public static void writeFileRenameInformation(FileRenameInformation information, Buffer<?> buffer)
MS-FSCC 2.4.34.2 FileRenameInformation for SMB2
-
-