Autopsy  4.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
FileExtMismatchDetectorModuleSettings.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2011-2016 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.autopsy.modules.fileextmismatch;
20 
21 import java.io.IOException;
22 import java.io.ObjectInputStream;
24 
28 final class FileExtMismatchDetectorModuleSettings implements IngestModuleIngestJobSettings {
29 
30  private static final long serialVersionUID = 1L;
31  private long versionNumber;
32  private boolean skipFilesWithNoExtension;
33  private boolean skipFilesWithTextPlainMimeType;
34  private boolean skipKnownFiles;
35 
36  FileExtMismatchDetectorModuleSettings() {
37  this.skipFilesWithNoExtension = true;
38  this.skipFilesWithTextPlainMimeType = true;
39  this.skipKnownFiles = true;
40  }
41 
42  FileExtMismatchDetectorModuleSettings(boolean skipKnownFiles, boolean skipFilesWithNoExtension, boolean skipFilesWithTextPlainMimeType) {
43  this.skipFilesWithNoExtension = skipFilesWithNoExtension;
44  this.skipFilesWithTextPlainMimeType = skipFilesWithTextPlainMimeType;
45  this.skipKnownFiles = skipKnownFiles;
46  }
47 
48  @Override
49  public long getVersionNumber() {
50  return serialVersionUID;
51  }
52 
53  void setSkipFilesWithNoExtension(boolean skipFilesWithNoExtension) {
54  this.skipFilesWithNoExtension = skipFilesWithNoExtension;
55  }
56 
57  boolean skipFilesWithNoExtension() {
58  return skipFilesWithNoExtension;
59  }
60 
61  void setSkipFilesWithTextPlainMimeType(boolean skipFilesWithTextPlainMimeType) {
62  this.skipFilesWithTextPlainMimeType = skipFilesWithTextPlainMimeType;
63  }
64 
65  boolean skipFilesWithTextPlainMimeType() {
66  return skipFilesWithTextPlainMimeType;
67  }
68 
69  boolean skipKnownFiles() {
70  return skipKnownFiles;
71  }
72 
73  void setSkipKnownFiles(boolean skipKnownFiles) {
74  this.skipKnownFiles = skipKnownFiles;
75  }
76 
77  private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
78  in.defaultReadObject();
79  if (0L == versionNumber) {
80  /*
81  * If the version number is set to the Java field default value of
82  * zero, then skipKnownFiles is a new field. Change this to the
83  * desired default value of true.
84  */
85  skipKnownFiles = true;
86  }
87  versionNumber = 1;
88  }
89 
90 }

Copyright © 2012-2016 Basis Technology. Generated on: Tue Oct 25 2016
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.