Sleuth Kit Java Bindings (JNI)  4.12.1
Java bindings for using The Sleuth Kit
TskData.java
Go to the documentation of this file.
1 /*
2  * Sleuth Kit Data Model
3  *
4  * Copyright 2011 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.datamodel;
20 
21 import java.text.MessageFormat;
22 import java.util.ResourceBundle;
23 import java.util.EnumSet;
24 import java.util.Set;
25 
30 public class TskData {
31 
32  private final static ResourceBundle bundle = ResourceBundle.getBundle("org.sleuthkit.datamodel.Bundle");
33 
38  public enum TSK_FS_NAME_TYPE_ENUM {
39 
40  UNDEF(0, "-"),
41  FIFO(1, "p"),
42  CHR(2, "c"),
43  DIR(3, "d"),
44  BLK(4, "b"),
45  REG(5, "r"),
46  LNK(6, "l"),
47  SOCK(7, "s"),
48  SHAD(8, "h"),
49  WHT(9, "w"),
50  VIRT(10, "v"),
51  VIRT_DIR(11, "V");
52 
53  private short dirType;
54  String label;
55 
56  private TSK_FS_NAME_TYPE_ENUM(int type, String label) {
57  this.dirType = (short) type;
58  this.label = label;
59  }
60 
66  public short getValue() {
67  return dirType;
68  }
69 
75  public String getLabel() {
76  return this.label;
77  }
78 
86  static public TSK_FS_NAME_TYPE_ENUM valueOf(short dir_type) {
87  for (TSK_FS_NAME_TYPE_ENUM v : TSK_FS_NAME_TYPE_ENUM.values()) {
88  if (v.dirType == dir_type) {
89  return v;
90  }
91  }
92  throw new IllegalArgumentException(
93  MessageFormat.format(bundle.getString("TskData.tskFsNameTypeEnum.exception.msg1.text"), dir_type));
94  }
95  }
96 
101  public enum TSK_FS_META_TYPE_ENUM {
102 
115 
116  private short metaType;
117  private String metaTypeStr;
118 
119  private TSK_FS_META_TYPE_ENUM(int type, String metaTypeStr) {
120  this.metaType = (short) type;
121  this.metaTypeStr = metaTypeStr;
122  }
123 
129  public short getValue() {
130  return metaType;
131  }
132 
133  @Override
134  public String toString() {
135  return metaTypeStr;
136  }
137 
138  public static TSK_FS_META_TYPE_ENUM valueOf(short metaType) {
139  for (TSK_FS_META_TYPE_ENUM type : TSK_FS_META_TYPE_ENUM.values()) {
140  if (type.getValue() == metaType) {
141  return type;
142  }
143  }
144  throw new IllegalArgumentException(
145  MessageFormat.format(bundle.getString("TskData.tskFsMetaTypeEnum.exception.msg1.text"), metaType));
146  }
147  }
148 
154  public enum TSK_FS_NAME_FLAG_ENUM {
155 
156  UNKNOWN(0, bundle.getString("TskData.tskFsNameFlagEnum.unknown")),
157  ALLOC(1, bundle.getString("TskData.tskFsNameFlagEnum.allocated")),
158  UNALLOC(2, bundle.getString("TskData.tskFsNameFlagEnum.unallocated"));
159 
160  private short dirFlag;
161  private String dirFlagStr;
162 
163  private TSK_FS_NAME_FLAG_ENUM(int flag, String dirFlagStr) {
164  this.dirFlag = (short) flag;
165  this.dirFlagStr = dirFlagStr;
166  }
167 
173  public short getValue() {
174  return dirFlag;
175  }
176 
177  @Override
178  public String toString() {
179  return dirFlagStr;
180  }
181 
189  public static TSK_FS_NAME_FLAG_ENUM valueOf(int dirFlag) {
190  for (TSK_FS_NAME_FLAG_ENUM flag : TSK_FS_NAME_FLAG_ENUM.values()) {
191  if (flag.dirFlag == dirFlag) {
192  return flag;
193  }
194  }
195 
197  }
198  }
199 
205  public enum TSK_FS_META_FLAG_ENUM {
206 
207  UNKNOWN(0, bundle.getString("TskData.tskFsMetaFlagEnum.unknown")),
208  ALLOC(1, bundle.getString("TskData.tskFsMetaFlagEnum.allocated")),
209  UNALLOC(2, bundle.getString("TskData.tskFsMetaFlagEnum.unallocated")),
210  USED(4, bundle.getString("TskData.tskFsMetaFlagEnum.used")),
211  UNUSED(8, bundle.getString("TskData.tskFsMetaFlagEnum.unused")),
212  COMP(16, bundle.getString("TskData.tskFsMetaFlagEnum.compressed")),
213  ORPHAN(32, bundle.getString("TskData.tskFsMetaFlagEnum.orphan"));
214 
215  private short meta_flag;
216  private String label;
217 
218  private TSK_FS_META_FLAG_ENUM(int flag, String label) {
219  this.meta_flag = (short) flag;
220  this.label = label;
221  }
222 
228  public short getValue() {
229  return meta_flag;
230  }
231 
237  @Override
238  public String toString() {
239  return label;
240  }
241 
249  public static Set<TSK_FS_META_FLAG_ENUM> valuesOf(short metaFlags) {
250  Set<TSK_FS_META_FLAG_ENUM> matchedFlags = EnumSet.noneOf(TSK_FS_META_FLAG_ENUM.class);
251 
252  if (metaFlags == TSK_FS_META_FLAG_ENUM.UNKNOWN.getValue()) {
253  matchedFlags.add(TSK_FS_META_FLAG_ENUM.UNKNOWN);
254  return matchedFlags;
255  }
256 
257  for (TSK_FS_META_FLAG_ENUM v : TSK_FS_META_FLAG_ENUM.values()) {
258  long flag = v.getValue();
259 
260  if ((metaFlags & flag) == flag) {
261  matchedFlags.add(v);
262  }
263  }
264 
265  return matchedFlags;
266  }
267 
268  public static short toInt(Set<TSK_FS_META_FLAG_ENUM> metaFlags) {
269  short val = 0;
270  for (TSK_FS_META_FLAG_ENUM flag : metaFlags) {
271  val |= flag.getValue();
272  }
273  return val;
274  }
275 
276  }
277 
282  public enum TSK_FS_ATTR_TYPE_ENUM {
283 
289  TSK_FS_ATTR_TYPE_NTFS_VVER(0x40), // 64 (NT)
290  TSK_FS_ATTR_TYPE_NTFS_OBJID(0x40), // 64 (2K)
298  TSK_FS_ATTR_TYPE_NTFS_SYMLNK(0xC0), // 192 (NT)
299  TSK_FS_ATTR_TYPE_NTFS_REPARSE(0xC0), // 192 (2K)
304  TSK_FS_ATTR_TYPE_UNIX_INDIR(0x1001), // Indirect blocks for UFS and ExtX file systems
305 
306  // Types for HFS+ File Attributes
307  TSK_FS_ATTR_TYPE_HFS_DEFAULT(0x01), // 1 Data fork of fs special files and misc
308  TSK_FS_ATTR_TYPE_HFS_DATA(0x1100), // 4352 Data fork of regular files
309  TSK_FS_ATTR_TYPE_HFS_RSRC(0x1101), // 4353 Resource fork of regular files
310  TSK_FS_ATTR_TYPE_HFS_EXT_ATTR(0x1102), // 4354 Extended Attributes) except compression records
311  TSK_FS_ATTR_TYPE_HFS_COMP_REC(0x1103); // 4355 Compression records
312 
313  private int val;
314 
315  private TSK_FS_ATTR_TYPE_ENUM(int val) {
316  this.val = val;
317  }
318 
319  public int getValue() {
320  return val;
321  }
322 
323  public static TSK_FS_ATTR_TYPE_ENUM valueOf(int val) {
324  for (TSK_FS_ATTR_TYPE_ENUM type : TSK_FS_ATTR_TYPE_ENUM.values()) {
325  if (type.val == val) {
326  return type;
327  }
328  }
329  throw new IllegalArgumentException(
330  MessageFormat.format(bundle.getString("TskData.tskFsAttrTypeEnum.exception.msg1.text"), val));
331  }
332  };
333 
338  public enum TSK_VS_PART_FLAG_ENUM {
339 
344 
345  private long vs_flag;
346 
347  private TSK_VS_PART_FLAG_ENUM(long flag) {
348  vs_flag = flag;
349  }
350 
356  public long getVsFlag() {
357  return vs_flag;
358  }
359 
360  }
361 
366  public enum TSK_FS_META_MODE_ENUM {
367  /*
368  * The following describe the file permissions
369  */
370 
374 
378 
382 
386 
387  private short mode;
388 
389  private TSK_FS_META_MODE_ENUM(int mode) {
390  this.mode = (short) mode;
391  }
392 
398  public short getMode() {
399  return mode;
400  }
401 
410  public static Set<TSK_FS_META_MODE_ENUM> valuesOf(short modes) {
411  Set<TSK_FS_META_MODE_ENUM> matchedFlags = EnumSet.noneOf(TSK_FS_META_MODE_ENUM.class);
412 
413  for (TSK_FS_META_MODE_ENUM v : TSK_FS_META_MODE_ENUM.values()) {
414  long flag = v.getMode();
415 
416  if ((modes & flag) == flag) {
417  matchedFlags.add(v);
418  }
419  }
420 
421  return matchedFlags;
422  }
423 
429  public static short toInt(Set<TSK_FS_META_MODE_ENUM> modes) {
430  short modesInt = 0;
431  for (TSK_FS_META_MODE_ENUM mode : modes) {
432  modesInt |= mode.getMode();
433  }
434  return modesInt;
435  }
436  };
437 
442  public enum TSK_FS_TYPE_ENUM {
443 
444  TSK_FS_TYPE_DETECT(0x00000000, bundle.getString("TskData.tskFsTypeEnum.autoDetect")),
445  TSK_FS_TYPE_NTFS(0x00000001, "NTFS"),
446  TSK_FS_TYPE_NTFS_DETECT(0x00000001, bundle.getString("TskData.tskFsTypeEnum.NTFSautoDetect")),
447  TSK_FS_TYPE_FAT12(0x00000002, "FAT12"),
448  TSK_FS_TYPE_FAT16(0x00000004, "FAT16"),
449  TSK_FS_TYPE_FAT32(0x00000008, "FAT32"),
450  TSK_FS_TYPE_EXFAT(0x0000000A, "ExFAT"),
451  TSK_FS_TYPE_FAT_DETECT(0x0000000e, bundle.getString("TskData.tskFsTypeEnum.FATautoDetect")),
452  TSK_FS_TYPE_FFS1(0x00000010, "UFS1"),
453  TSK_FS_TYPE_FFS1B(0x00000020, "UFS1b"),
454  TSK_FS_TYPE_FFS2(0x00000040, "UFS2"),
455  TSK_FS_TYPE_FFS_DETECT(0x00000070, "UFS"),
456  TSK_FS_TYPE_EXT2(0x00000080, "Ext2"),
457  TSK_FS_TYPE_EXT3(0x00000100, "Ext3"),
458  TSK_FS_TYPE_EXT_DETECT(0x00000180, bundle.getString("TskData.tskFsTypeEnum.ExtXautoDetect")),
459  TSK_FS_TYPE_SWAP(0x00000200, "SWAP"),
460  TSK_FS_TYPE_SWAP_DETECT(0x00000200, bundle.getString("TskData.tskFsTypeEnum.SWAPautoDetect")),
461  TSK_FS_TYPE_RAW(0x00000400, "RAW"),
462  TSK_FS_TYPE_RAW_DETECT(0x00000400, bundle.getString("TskData.tskFsTypeEnum.RAWautoDetect")),
463  TSK_FS_TYPE_ISO9660(0x00000800, "ISO9660"),
464  TSK_FS_TYPE_ISO9660_DETECT(0x00000800, bundle.getString("TskData.tskFsTypeEnum.ISO9660autoDetect")),
465  TSK_FS_TYPE_HFS(0x00001000, "HFS"),
466  TSK_FS_TYPE_HFS_DETECT(0x00001000, bundle.getString("TskData.tskFsTypeEnum.HFSautoDetect")),
467  TSK_FS_TYPE_EXT4(0x00002000, "Ext4"),
468  TSK_FS_TYPE_YAFFS2(0x00004000, "YAFFS2"),
469  TSK_FS_TYPE_YAFFS2_DETECT(0x00004000, bundle.getString("TskData.tskFsTypeEnum.YAFFS2autoDetect")),
470  TSK_FS_TYPE_APFS(0x00010000, "APFS"),
471  TSK_FS_TYPE_APFS_DETECT(0x00010000, bundle.getString("TskData.tskFsTypeEnum.APFSautoDetect")),
472  TSK_FS_TYPE_LOGICAL(0x00020000, "Logical"),
473  TSK_FS_TYPE_UNSUPP(0xffffffff, bundle.getString("TskData.tskFsTypeEnum.unsupported"));
474 
475  private int value;
476  private String displayName;
477 
478  private TSK_FS_TYPE_ENUM(int value, String displayName) {
479  this.value = value;
480  this.displayName = displayName;
481  }
482 
488  public int getValue() {
489  return value;
490  }
491 
497  public String getDisplayName() {
498  return displayName;
499  }
500 
509  public static TSK_FS_TYPE_ENUM valueOf(int fsTypeValue) {
510  for (TSK_FS_TYPE_ENUM type : TSK_FS_TYPE_ENUM.values()) {
511  if (type.value == fsTypeValue) {
512  return type;
513  }
514  }
515  throw new IllegalArgumentException(
516  MessageFormat.format(bundle.getString("TskData.tskFsTypeEnum.exception.msg1.text"), fsTypeValue));
517  }
518 
519  };
520 
525  public enum TSK_IMG_TYPE_ENUM {
526 
527  TSK_IMG_TYPE_DETECT(0, bundle.getString("TskData.tskImgTypeEnum.autoDetect")), // Auto Detection
528  TSK_IMG_TYPE_RAW_SING(1, bundle.getString("TskData.tskImgTypeEnum.rawSingle")), // Single raw file (dd)
529  TSK_IMG_TYPE_RAW_SPLIT(2, bundle.getString("TskData.tskImgTypeEnum.rawSplit")), // Split raw files
530  TSK_IMG_TYPE_AFF_AFF(4, "AFF"), // Advanced Forensic Format NON-NLS
531  TSK_IMG_TYPE_AFF_AFD(8, "AFD"), // AFF Multiple File NON-NLS
532  TSK_IMG_TYPE_AFF_AFM(16, "AFM"), // AFF with external metadata NON-NLS
533  TSK_IMG_TYPE_AFF_ANY(32, "AFF"), // All AFFLIB image formats (including beta ones) NON-NLS
534  TSK_IMG_TYPE_EWF_EWF(64, "E01"), // Expert Witness format (encase) NON-NLS
535  TSK_IMG_TYPE_VMDK_VMDK(128, "VMDK"), // VMware Virtual Disk (VMDK) NON-NLS
536  TSK_IMG_TYPE_VHD_VHD(256, "VHD"), // Virtual Hard Disk (VHD) image format NON-NLS
537  TSK_IMG_TYPE_POOL_POOL(16384, "POOL"), // Pool (internal use) NON-NLS
538  TSK_IMG_TYPE_LOGICAL(32768, "Logical"),
539  TSK_IMG_TYPE_UNSUPP(65535, bundle.getString("TskData.tskImgTypeEnum.unknown")); // Unsupported Image Type
540 
541  private long imgType;
542  private String name;
543 
544  private TSK_IMG_TYPE_ENUM(long type, String name) {
545  this.imgType = type;
546  this.name = name;
547  }
548 
549  public static TSK_IMG_TYPE_ENUM valueOf(long imgType) {
550  for (TSK_IMG_TYPE_ENUM type : TSK_IMG_TYPE_ENUM.values()) {
551  if (type.getValue() == imgType) {
552  return type;
553  }
554  }
555  throw new IllegalArgumentException(
556  MessageFormat.format(bundle.getString("TskData.tskImgTypeEnum.exception.msg1.text"), imgType));
557  }
558 
564  public long getValue() {
565  return imgType;
566  }
567 
573  public String getName() {
574  return name;
575  }
576  };
577 
582  public enum TSK_VS_TYPE_ENUM {
583 
584  TSK_VS_TYPE_DETECT(0x0000, bundle.getString("TskData.tskVSTypeEnum.autoDetect")),
585  TSK_VS_TYPE_DOS(0x0001, "DOS"),
586  TSK_VS_TYPE_BSD(0x0002, "BSD"),
587  TSK_VS_TYPE_SUN(0x0004, "SUN VTOC"),
588  TSK_VS_TYPE_MAC(0x0008, "Mac"),
589  TSK_VS_TYPE_GPT(0x0010, "GPT"),
590  TSK_VS_TYPE_APFS(0x0020, "APFS"),
591  TSK_VS_TYPE_DBFILLER(0x00F0, bundle.getString("TskData.tskVSTypeEnum.fake")),
592  TSK_VS_TYPE_UNSUPP(0xFFFF, bundle.getString("TskData.tskVSTypeEnum.unsupported"));
593 
594  private long vsType;
595  private String name;
596 
597  private TSK_VS_TYPE_ENUM(long type, String name) {
598  this.vsType = type;
599  this.name = name;
600  }
601 
602  public static TSK_VS_TYPE_ENUM valueOf(long vsType) {
603  for (TSK_VS_TYPE_ENUM type : TSK_VS_TYPE_ENUM.values()) {
604  if (type.getVsType() == vsType) {
605  return type;
606  }
607  }
608  throw new IllegalArgumentException(
609  MessageFormat.format(bundle.getString("TskData.tskVSTypeEnum.exception.msg1.text"), vsType));
610  }
611 
617  public long getVsType() {
618  return vsType;
619  }
620 
626  public String getName() {
627  return name;
628  }
629  };
630 
635  public enum ObjectType {
636 
637  IMG(0, bundle.getString("TskData.ObjectType.IMG.name")),
638  VS(1, bundle.getString("TskData.ObjectType.VS.name")),
639  VOL(2, bundle.getString("TskData.ObjectType.VOL.name")),
640  FS(3, bundle.getString("TskData.ObjectType.FS.name")),
641  ABSTRACTFILE(4, bundle.getString("TskData.ObjectType.AbstractFile.name")),
642  ARTIFACT(5, bundle.getString("TskData.ObjectType.Artifact.name")),
643  REPORT(6, bundle.getString("TskData.ObjectType.Report.name")),
644  POOL(7, bundle.getString("TskData.ObjectType.Pool.name")),
645  OS_ACCOUNT(8, bundle.getString("TskData.ObjectType.OsAccount.name")),
646  HOST_ADDRESS(9, bundle.getString("TskData.ObjectType.HostAddress.name")),
647  UNSUPPORTED(-1, bundle.getString("TskData.ObjectType.Unsupported.name"))
648  ;
649  private final short objectType;
650  private final String displayName;
651 
652  private ObjectType(int objectType, String displayName) {
653  this.objectType = (short) objectType;
654  this.displayName = displayName;
655  }
656 
662  public short getObjectType() {
663  return objectType;
664  }
665 
666  @Override
667  public String toString() {
668  return displayName;
669  }
670 
678  public static ObjectType valueOf(short objectType) {
679  for (ObjectType v : ObjectType.values()) {
680  if (v.objectType == objectType) {
681  return v;
682  }
683  }
684  return UNSUPPORTED;
685  }
686  }
687 
693 
694  FS(0, "File System"),
695  CARVED(1, "Carved"),
696  DERIVED(2, "Derived"),
697  LOCAL(3, "Local"),
698  UNALLOC_BLOCKS(4, "Unallocated Blocks"),
699  UNUSED_BLOCKS(5, "Unused Blocks"),
700  VIRTUAL_DIR(6, "Virtual Directory"),
701  SLACK(7, "Slack"),
702  LOCAL_DIR(8, "Local Directory"),
703  LAYOUT_FILE(9, "Layout File"),
704  ;
705 
706  private final short fileType;
707  private final String name;
708 
709  private TSK_DB_FILES_TYPE_ENUM(int fileType, String name) {
710  this.fileType = (short) fileType;
711  this.name = name;
712  }
713 
721  public static TSK_DB_FILES_TYPE_ENUM valueOf(short fileType) {
722  for (TSK_DB_FILES_TYPE_ENUM type : TSK_DB_FILES_TYPE_ENUM.values()) {
723  if (type.fileType == fileType) {
724  return type;
725  }
726  }
727  throw new IllegalArgumentException(
728  MessageFormat.format(bundle.getString("TskData.tskDbFilesTypeEnum.exception.msg1.text"), fileType));
729  }
730 
736  public short getFileType() {
737  return fileType;
738  }
739 
740  public String getName() {
741  return name;
742  }
743  }
744 
749  public enum TSK_POOL_TYPE_ENUM {
750  TSK_POOL_TYPE_DETECT(0, "Auto detect"),
751  TSK_POOL_TYPE_APFS(1, "APFS Pool"),
752  TSK_POOL_TYPE_UNSUPP(0xffff, "Unsupported")
753  ;
754 
755  private final short poolType;
756  private final String name;
757 
758  TSK_POOL_TYPE_ENUM(int poolType, String name) {
759  this.poolType = (short) poolType;
760  this.name = name;
761  }
762 
770  public static TSK_POOL_TYPE_ENUM valueOf(long poolType) {
771  for (TSK_POOL_TYPE_ENUM type : TSK_POOL_TYPE_ENUM.values()) {
772  if (type.poolType == poolType) {
773  return type;
774  }
775  }
776  throw new IllegalArgumentException(
777  MessageFormat.format(bundle.getString("TskData.tskDbFilesTypeEnum.exception.msg1.text"), poolType)); // TODO
778  }
779 
785  public short getValue() {
786  return poolType;
787  }
788 
789  public String getName() {
790  return name;
791  }
792  }
793 
798  public enum FileKnown {
799 
800  UNKNOWN(0, bundle.getString("TskData.fileKnown.unknown")),
801  KNOWN(1, bundle.getString("TskData.fileKnown.known")),
802  BAD(2, bundle.getString("TskData.fileKnown.knownBad"));
803 
804  private byte known;
805  private String name;
806 
807  private FileKnown(int known, String name) {
808  this.known = (byte) known;
809  this.name = name;
810  }
811 
819  public static FileKnown valueOf(byte known) {
820  for (FileKnown v : FileKnown.values()) {
821  if (v.known == known) {
822  return v;
823  }
824  }
825  throw new IllegalArgumentException(
826  MessageFormat.format(bundle.getString("TskData.fileKnown.exception.msg1.text"), known));
827  }
828 
829  public String getName() {
830  return this.name;
831  }
832 
838  public byte getFileKnownValue() {
839  return this.known;
840  }
841  }
842 
847  public enum DbType {
848 
849  // Add any additional remote database types here, and keep it in sync
850  // with the Sleuthkit version of this enum located at:
851  // sleuthkit/tsk/auto/db_connection_info.h
852  // Be sure to add to settingsValid() if you add a type here.
853  SQLITE(0),
855 
856  private int value;
857 
858  DbType(int val) {
859  this.value = val;
860  }
861 
862  public int getValue() {
863  return this.value;
864  }
865  }
866 
874  public enum EncodingType{
875  // Update EncodedFileUtil.java to handle any new types
876  NONE(0),
877  XOR1(1);
878 
879  private final int type;
880 
881  private EncodingType(int type){
882  this.type = type;
883  }
884 
885  public int getType(){
886  return type;
887  }
888 
889  public static EncodingType valueOf(int type) {
890  for (EncodingType v : EncodingType.values()) {
891  if (v.type == type) {
892  return v;
893  }
894  }
895  throw new IllegalArgumentException(
896  MessageFormat.format(bundle.getString("TskData.encodingType.exception.msg1.text"), type));
897  }
898  }
899 
904  public enum CollectedStatus{
905 
918  YES_TSK(12),
919  YES_REPO(13);
920 
921  private final int type;
922 
923  private CollectedStatus(int type){
924  this.type = type;
925  }
926 
927  public int getType(){
928  return type;
929  }
930 
931  public static CollectedStatus valueOf(int type) {
932  for (CollectedStatus v : CollectedStatus.values()) {
933  if (v.type == type) {
934  return v;
935  }
936  }
937  throw new IllegalArgumentException(
938  MessageFormat.format(bundle.getString("TskData.collectedStatus.exception.msg1.text"), type));
939  }
940  }
941 
946  LITERAL(0),
948  REGEX(2);
949 
950  private final int type;
951 
952  private KeywordSearchQueryType(int type){
953  this.type = type;
954  }
955 
956  public int getType(){
957  return type;
958  }
959 
960  public static KeywordSearchQueryType valueOf(int type) {
962  if (v.type == type) {
963  return v;
964  }
965  }
966  throw new IllegalArgumentException(
967  MessageFormat.format(bundle.getString("TskData.keywordSearchQueryType.exception.msg1.text"), type));
968  }
969  };
970 
971 
972 }
VIRT
Special (TSK added "Virtual" files) NON-NLS.
Definition: TskData.java:50
FS
File that can be found in file system tree.
Definition: TskData.java:694
static FileKnown valueOf(byte known)
Definition: TskData.java:819
TSK_POOL_TYPE_ENUM(int poolType, String name)
Definition: TskData.java:758
TSK_VS_PART_FLAG_ALL
Show all sectors in the walk.
Definition: TskData.java:343
TSK_VS_TYPE_BSD
BSD Partition table NON-NLS.
Definition: TskData.java:586
TSK_VS_TYPE_MAC
Mac partition table NON-NLS.
Definition: TskData.java:588
static Set< TSK_FS_META_FLAG_ENUM > valuesOf(short metaFlags)
Definition: TskData.java:249
TSK_VS_TYPE_DBFILLER
fake partition table type for loaddb (for images that do not have a volume system) ...
Definition: TskData.java:591
UNUSED
Metadata structure has never been allocated.
Definition: TskData.java:211
ALLOC
Metadata structure is currently in an allocated state.
Definition: TskData.java:208
TSK_VS_PART_FLAG_ALLOC
Sectors are allocated to a volume in the volume system.
Definition: TskData.java:340
static TSK_FS_TYPE_ENUM valueOf(int fsTypeValue)
Definition: TskData.java:509
UNALLOC
Metadata structure is currently in an unallocated state.
Definition: TskData.java:209
static TSK_FS_META_TYPE_ENUM valueOf(short metaType)
Definition: TskData.java:138
TSK_FS_META_TYPE_VIRT_DIR
"Virtual Directory" created by TSK for Orphan Files NON-NLS
Definition: TskData.java:114
COMP
The file contents are compressed.
Definition: TskData.java:212
HOST_ADDRESS
Host Address - see tsk_host_addresses for more details.
Definition: TskData.java:646
LAYOUT_FILE
Set of blocks from an image that have been designated as a file.
Definition: TskData.java:703
TSK_FS_TYPE_YAFFS2_DETECT
YAFFS2 auto detection.
Definition: TskData.java:469
TSK_VS_PART_FLAG_META
Sectors contain volume system metadata and could also be ALLOC or UNALLOC.
Definition: TskData.java:342
TSK_FS_TYPE_FFS1B
UFS1b (Solaris - has no type)
Definition: TskData.java:453
TSK_FS_TYPE_FFS1
UFS1 (FreeBSD, OpenBSD, BSDI ...)
Definition: TskData.java:452
static TSK_FS_ATTR_TYPE_ENUM valueOf(int val)
Definition: TskData.java:323
LOCAL
Local file that was added (not from a disk image)
Definition: TskData.java:697
static TSK_POOL_TYPE_ENUM valueOf(long poolType)
Definition: TskData.java:770
CARVED
Set of blocks for a file found from carving. Could be on top of a TSK_DB_FILES_TYPE_UNALLOC_BLOCKS ra...
Definition: TskData.java:695
static TSK_FS_NAME_FLAG_ENUM valueOf(int dirFlag)
Definition: TskData.java:189
TSK_FS_TYPE_ISO9660_DETECT
ISO9660 auto detection.
Definition: TskData.java:464
FS
File System - see tsk_fs_info for more details.
Definition: TskData.java:640
USED
Metadata structure has been allocated at least once.
Definition: TskData.java:210
VIRT_DIR
Special (TSK added "Virtual" directories) NON-NLS.
Definition: TskData.java:51
LOCAL_DIR
Local directory that was added (not from a disk image)
Definition: TskData.java:702
VOL
Volume - see tsk_vs_parts for more details.
Definition: TskData.java:639
static EncodingType valueOf(int type)
Definition: TskData.java:889
TSK_FS_META_TYPE_VIRT
"Virtual File" created by TSK for file system areas NON-NLS
Definition: TskData.java:113
TSK_VS_TYPE_GPT
GPT partition table NON-NLS.
Definition: TskData.java:589
TSK_FS_TYPE_DETECT
Use autodetection methods.
Definition: TskData.java:444
static TSK_FS_NAME_TYPE_ENUM valueOf(short dir_type)
Definition: TskData.java:86
REPORT
Artifact - see blackboard_artifacts for more details.
Definition: TskData.java:643
static short toInt(Set< TSK_FS_META_MODE_ENUM > modes)
Definition: TskData.java:429
BAD
File marked as known and bad/notable/interesting by hash db.
Definition: TskData.java:802
DERIVED
File derived from a parent file (i.e. from ZIP)
Definition: TskData.java:696
OS_ACCOUNT
OS Account - see tsk_os_accounts for more details.
Definition: TskData.java:645
static TSK_DB_FILES_TYPE_ENUM valueOf(short fileType)
Definition: TskData.java:721
static short toInt(Set< TSK_FS_META_FLAG_ENUM > metaFlags)
Definition: TskData.java:268
static TSK_IMG_TYPE_ENUM valueOf(long imgType)
Definition: TskData.java:549
UNALLOC_BLOCKS
Set of blocks not allocated by file system. Parent should be image, volume, or file system...
Definition: TskData.java:698
TSK_FS_META_TYPE_SOCK
UNIX domain socket NON-NLS.
Definition: TskData.java:111
static ObjectType valueOf(short objectType)
Definition: TskData.java:678
TSK_POOL_TYPE_DETECT
Use autodetection methods.
Definition: TskData.java:750
UNKNOWN
File marked as unknown by hash db.
Definition: TskData.java:800
static Set< TSK_FS_META_MODE_ENUM > valuesOf(short modes)
Definition: TskData.java:410
TSK_VS_TYPE_DETECT
Use autodetection methods.
Definition: TskData.java:584
static KeywordSearchQueryType valueOf(int type)
Definition: TskData.java:960
KNOWN
File marked as a known by hash db.
Definition: TskData.java:801
VIRTUAL_DIR
Virtual directory (not on fs) with no meta-data entry that can be used to group files of types other ...
Definition: TskData.java:700
TSK_VS_PART_FLAG_UNALLOC
Sectors are not allocated to a volume.
Definition: TskData.java:341
static TSK_VS_TYPE_ENUM valueOf(long vsType)
Definition: TskData.java:602
ABSTRACTFILE
File - see tsk_files for more details.
Definition: TskData.java:641
TSK_VS_TYPE_DOS
DOS Partition table NON-NLS.
Definition: TskData.java:585
ORPHAN
Return only metadata structures that have no file name pointing to the (inode_walk flag only) ...
Definition: TskData.java:213
UNUSED_BLOCKS
Set of blocks that are unallocated AND not used by a carved or other file type. Parent should be UNAL...
Definition: TskData.java:699
static CollectedStatus valueOf(int type)
Definition: TskData.java:931
VS
Volume System - see tsk_vs_info for more details.
Definition: TskData.java:638
IMG
Disk Image - see tsk_image_info for more details.
Definition: TskData.java:637
UNALLOC
Name is in an unallocated state.
Definition: TskData.java:158

Copyright © 2011-2021 Brian Carrier. (carrier -at- sleuthkit -dot- org)
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.