diff --git a/bindings/java/nbproject/project.properties b/bindings/java/nbproject/project.properties new file mode 100755 index 0000000000000000000000000000000000000000..26c94f23d29bb4de6fd89c3c6b44b401ad3c5ba3 --- /dev/null +++ b/bindings/java/nbproject/project.properties @@ -0,0 +1,6 @@ +auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignJavadocExceptionDescriptions=true +auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignJavadocParameterDescriptions=true +auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.alignJavadocReturnDescription=true +auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blankLineAfterJavadocParameterDescriptions=true +auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blankLineAfterJavadocReturnTag=true +auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.enableBlockCommentFormatting=true diff --git a/bindings/java/src/org/sleuthkit/datamodel/AbstractContent.java b/bindings/java/src/org/sleuthkit/datamodel/AbstractContent.java index c469f19f2b49a3d5407acf6155bfeaf13ffd51ae..3436e0e2e3c3e03af9dc4ce76a6874b7eed84b57 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/AbstractContent.java +++ b/bindings/java/src/org/sleuthkit/datamodel/AbstractContent.java @@ -136,7 +136,8 @@ void setParent(Content parent) { * Set the ID of the this AbstractContent's parent * * @param parentId the ID of the parent. Note: use - * AbstractContent.UNKNOWN_ID if the parent's ID is not known. + * AbstractContent.UNKNOWN_ID if the parent's ID is not + * known. */ void setParentId(long parentId) { this.parentId = parentId; diff --git a/bindings/java/src/org/sleuthkit/datamodel/AbstractDataSource.java b/bindings/java/src/org/sleuthkit/datamodel/AbstractDataSource.java index 52fb1127e24a34b73528c678b7d9d8a99595f423..dc2eb98972627cdabf29e227c1ad91311a10bfd2 100755 --- a/bindings/java/src/org/sleuthkit/datamodel/AbstractDataSource.java +++ b/bindings/java/src/org/sleuthkit/datamodel/AbstractDataSource.java @@ -41,8 +41,8 @@ class AbstractDataSource implements DataSource { * * @param objectId The object id of the data source. * @param deviceId An ASCII-printable identifier for the device associated - * with the data source that is intended to be unique across multiple cases - * (e.g., a UUID). + * with the data source that is intended to be unique across + * multiple cases (e.g., a UUID). * @param timeZone The time zone that was used to process the data source. */ AbstractDataSource(long objectId, String deviceId, String timeZone) { diff --git a/bindings/java/src/org/sleuthkit/datamodel/AbstractFile.java b/bindings/java/src/org/sleuthkit/datamodel/AbstractFile.java index 2909dcd935a0465638fd66a5c2da00eeca781d8c..ef6b46a362d3b2e8beaade929b41c25c0b955dc5 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/AbstractFile.java +++ b/bindings/java/src/org/sleuthkit/datamodel/AbstractFile.java @@ -84,14 +84,14 @@ public abstract class AbstractFile extends AbstractContent { * Initializes common fields used by AbstactFile implementations (objects in * tsk_files table) * - * @param db case / db handle where this file belongs to - * @param objId object id in tsk_objects table + * @param db case / db handle where this file belongs to + * @param objId object id in tsk_objects table * @param dataSourceObjectId The object id of the root data source of this - * file. + * file. * @param attrType * @param attrId - * @param name name field of the file - * @param fileType type of the file + * @param name name field of the file + * @param fileType type of the file * @param metaAddr * @param metaSeq * @param dirType @@ -106,11 +106,12 @@ public abstract class AbstractFile extends AbstractContent { * @param modes * @param uid * @param gid - * @param md5Hash md5sum of the file, or null or "NULL" if not present - * @param knownState knownState status of the file, or null if unknown - * (default) + * @param md5Hash md5sum of the file, or null or "NULL" if not + * present + * @param knownState knownState status of the file, or null if + * unknown (default) * @param parentPath - * @param mimeType The MIME type of the file, can be null + * @param mimeType The MIME type of the file, can be null */ AbstractFile(SleuthkitCase db, long objId, @@ -477,7 +478,7 @@ public TskData.FileKnown getKnown() { * that extensions only have ASCII alphanumeric chars * * @return filename extension in lowercase (not including the period) or - * empty string if there is no extension + * empty string if there is no extension */ public String getNameExtension() { String ext; @@ -522,8 +523,9 @@ public String getParentPath() { * Gets the data source for this file. * * @return The data source. + * * @throws TskCoreException if there was an error querying the case - * database. + * database. */ @Override public Content getDataSource() throws TskCoreException { @@ -545,8 +547,9 @@ long getDataSourceObjectId() { * or more block ranges associated with it * * @return list of file layout ranges + * * @throws TskCoreException exception thrown if critical error occurred - * within tsk core + * within tsk core */ public List<TskFileRange> getRanges() throws TskCoreException { if (ranges == null) { @@ -559,11 +562,14 @@ public List<TskFileRange> getRanges() throws TskCoreException { * Convert an internal offset to an image offset * * @param fileOffset the byte offset in this layout file to map + * * @return the corresponding byte offset in the image where the file offset - * is located, or -1 if the file has no range layout information or if the - * fileOffset is larger than file size + * is located, or -1 if the file has no range layout information or + * if the fileOffset is larger than file size + * * @throws TskCoreException exception thrown if critical error occurred - * within tsk core and offset could not be converted + * within tsk core and offset could not be + * converted */ public long convertToImgOffset(long fileOffset) throws TskCoreException { long imgOffset = -1; @@ -623,9 +629,11 @@ public boolean isDir() { /** * @param uniquePath the unique path to an AbstractFile (or subclass) - * usually obtained by a call to AbstractFile.getUniquePath. + * usually obtained by a call to + * AbstractFile.getUniquePath. + * * @return the path to to an AbstractFile (or subclass) with the image and - * volume path segments removed. + * volume path segments removed. */ public static String createNonUniquePath(String uniquePath) { @@ -653,7 +661,8 @@ public static String createNonUniquePath(String uniquePath) { /** * @return a list of AbstractFiles that are the children of this Directory. - * Only returns children of type TskData.TSK_DB_FILES_TYPE_ENUM.FS. + * Only returns children of type TskData.TSK_DB_FILES_TYPE_ENUM.FS. + * * @throws org.sleuthkit.datamodel.TskCoreException */ public List<AbstractFile> listFiles() throws TskCoreException { @@ -699,6 +708,7 @@ public String getDirTypeAsString() { /** * @param flag the TSK_FS_NAME_FLAG_ENUM to check + * * @return true if the given flag is set in this FsContent object. */ public boolean isDirNameFlagSet(TSK_FS_NAME_FLAG_ENUM flag) { @@ -707,7 +717,7 @@ public boolean isDirNameFlagSet(TSK_FS_NAME_FLAG_ENUM flag) { /** * @return a string representation of the directory name flag (type - * TSK_FS_NAME_FLAG_ENUM) + * TSK_FS_NAME_FLAG_ENUM) */ public String getDirFlagAsString() { return dirFlag.toString(); @@ -728,6 +738,7 @@ public String getMetaFlagsAsString() { /** * @param metaFlag the TSK_FS_META_FLAG_ENUM to check + * * @return true if the given meta flag is set in this FsContent object. */ public boolean isMetaFlagSet(TSK_FS_META_FLAG_ENUM metaFlag) { @@ -749,10 +760,12 @@ public final int read(byte[] buf, long offset, long len) throws TskCoreException /** * Internal custom read (non-local) method that child classes can implement * - * @param buf buffer to read into + * @param buf buffer to read into * @param offset start reading position in the file - * @param len number of bytes to read + * @param len number of bytes to read + * * @return number of bytes read + * * @throws TskCoreException exception thrown when file could not be read */ protected int readInt(byte[] buf, long offset, long len) throws TskCoreException { @@ -762,10 +775,12 @@ protected int readInt(byte[] buf, long offset, long len) throws TskCoreException /** * Local file path read support * - * @param buf buffer to read into + * @param buf buffer to read into * @param offset start reading position in the file - * @param len number of bytes to read + * @param len number of bytes to read + * * @return number of bytes read + * * @throws TskCoreException exception thrown when file could not be read */ protected final int readLocal(byte[] buf, long offset, long len) throws TskCoreException { @@ -830,9 +845,9 @@ protected final int readLocal(byte[] buf, long offset, long len) throws TskCoreE * the case db path or an absolute path. When set, subsequent invocations of * read() will read the file in the local path. * - * @param localPath local path to be set + * @param localPath local path to be set * @param isAbsolute true if the path is absolute, false if relative to the - * case db + * case db */ protected void setLocalPath(String localPath, boolean isAbsolute) { @@ -990,6 +1005,7 @@ public String toString(boolean preserveState) { * Return the epoch into string in ISO 8601 dateTime format * * @param epoch time in seconds + * * @return formatted date time string as "yyyy-MM-dd HH:mm:ss" */ public static String epochToTime(long epoch) { @@ -1004,6 +1020,7 @@ public static String epochToTime(long epoch) { * Convert from ISO 8601 formatted date time string to epoch time in seconds * * @param time formatted date time string as "yyyy-MM-dd HH:mm:ss" + * * @return epoch time in seconds */ public static long timeToEpoch(String time) { @@ -1031,6 +1048,7 @@ public enum MimeMatchEnum { * blackboard attribute for file type. * * @param mimeTypes Set of file types to compare against + * * @return */ public MimeMatchEnum isMimeType(SortedSet<String> mimeTypes) { @@ -1047,12 +1065,12 @@ public MimeMatchEnum isMimeType(SortedSet<String> mimeTypes) { * Initializes common fields used by AbstactFile implementations (objects in * tsk_files table) * - * @param db case / db handle where this file belongs to - * @param objId object id in tsk_objects table + * @param db case / db handle where this file belongs to + * @param objId object id in tsk_objects table * @param attrType * @param attrId - * @param name name field of the file - * @param fileType type of the file + * @param name name field of the file + * @param fileType type of the file * @param metaAddr * @param metaSeq * @param dirType @@ -1067,10 +1085,11 @@ public MimeMatchEnum isMimeType(SortedSet<String> mimeTypes) { * @param modes * @param uid * @param gid - * @param md5Hash md5sum of the file, or null or "NULL" if not present + * @param md5Hash md5sum of the file, or null or "NULL" if not present * @param knownState knownState status of the file, or null if unknown - * (default) + * (default) * @param parentPath + * * @deprecated Do not make subclasses outside of this package. */ @Deprecated diff --git a/bindings/java/src/org/sleuthkit/datamodel/BlackboardArtifact.java b/bindings/java/src/org/sleuthkit/datamodel/BlackboardArtifact.java index b9e1756d3a1fa099bb5a2930b8053876b128ead3..9bbb6da187e1657d04b1f4b400e594c8695766f1 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/BlackboardArtifact.java +++ b/bindings/java/src/org/sleuthkit/datamodel/BlackboardArtifact.java @@ -48,8 +48,8 @@ public static final class Type implements Serializable { /** * Constructs a type for a blackboard artifact * - * @param typeName The typeName of the type - * @param typeID the ID of the type + * @param typeName The typeName of the type + * @param typeID the ID of the type * @param displayName The display name of this type */ public Type(int typeID, String typeName, String displayName) { @@ -111,6 +111,7 @@ public boolean equals(Object that) { * Compares two Types to see if they are the same * * @param that the other type + * * @return true if it is the same type */ private boolean sameType(Type that) { @@ -219,7 +220,9 @@ public enum ARTIFACT_TYPE implements SleuthkitVisitableItem { TSK_FACE_DETECTED(38, "TSK_FACE_DETECTED", //NON-NLS bundle.getString("BlackboardArtifact.tskFaceDetected.text")); - /* SEE ABOVE -- KEEP C++ CODE IN SYNC */ + /* + * SEE ABOVE -- KEEP C++ CODE IN SYNC + */ private final String label; private final int typeID; private final String displayName; @@ -253,6 +256,7 @@ public int getTypeID() { * typeName * * @param label typeName string + * * @return the corresponding enum */ static public ARTIFACT_TYPE fromLabel(String label) { @@ -268,6 +272,7 @@ static public ARTIFACT_TYPE fromLabel(String label) { * Gets the artifact type enum value that corresponds to the given id * * @param ID the id + * * @return the corresponding enum */ static public ARTIFACT_TYPE fromID(int ID) { @@ -305,13 +310,13 @@ public <T> T accept(SleuthkitItemVisitor<T> v) { /** * Constructor for an artifact. Should only be used by SleuthkitCase * - * @param sleuthkitCase the case that can be used to access the database - * this artifact is part of - * @param artifactID the id for this artifact - * @param objID the object this artifact is associated with - * @param artifactTypeID the type id of this artifact + * @param sleuthkitCase the case that can be used to access the database + * this artifact is part of + * @param artifactID the id for this artifact + * @param objID the object this artifact is associated with + * @param artifactTypeID the type id of this artifact * @param artifactTypeName the type name of this artifact - * @param displayName the display name of this artifact + * @param displayName the display name of this artifact */ protected BlackboardArtifact(SleuthkitCase sleuthkitCase, long artifactID, long objID, int artifactTypeID, String artifactTypeName, String displayName) { this.sleuthkitCase = sleuthkitCase; @@ -325,14 +330,14 @@ protected BlackboardArtifact(SleuthkitCase sleuthkitCase, long artifactID, long /** * Constructor for an artifact. Should only be used by SleuthkitCase * - * @param Case the case that can be used to access the database this - * artifact is part of - * @param artifactID the id for this artifact - * @param objID the object this artifact is associated with - * @param artifactTypeID the type id of this artifact + * @param Case the case that can be used to access the database + * this artifact is part of + * @param artifactID the id for this artifact + * @param objID the object this artifact is associated with + * @param artifactTypeID the type id of this artifact * @param artifactTypeName the type name of this artifact - * @param displayName the display name of this artifact - * @param isNew true if we are currently creating the artifact + * @param displayName the display name of this artifact + * @param isNew true if we are currently creating the artifact */ BlackboardArtifact(SleuthkitCase sleuthkitCase, long artifactID, long objID, int artifactTypeID, String artifactTypeName, String displayName, boolean isNew) { this.sleuthkitCase = sleuthkitCase; @@ -397,8 +402,9 @@ public String getDisplayName() { * Add an attribute to this artifact * * @param attr the attribute to add + * * @throws TskCoreException if a critical error occurs and the attribute was - * not added + * not added */ public void addAttribute(BlackboardAttribute attr) throws TskCoreException { attr.setArtifactId(artifactID); @@ -412,8 +418,9 @@ public void addAttribute(BlackboardAttribute attr) throws TskCoreException { * (faster than individually) * * @param attributes List of attributes to add + * * @throws TskCoreException if a critical error occurs and the attribute was - * not added + * not added */ public void addAttributes(Collection<BlackboardAttribute> attributes) throws TskCoreException { if (attributes.isEmpty()) { @@ -432,8 +439,9 @@ public void addAttributes(Collection<BlackboardAttribute> attributes) throws Tsk * Gets all attributes associated with this artifact * * @return a list of attributes + * * @throws TskCoreException if a critical error occurs and the attributes - * are not fetched + * are not fetched */ public List<BlackboardAttribute> getAttributes() throws TskCoreException { if (loadedCacheFromDb == false) { @@ -450,9 +458,11 @@ public List<BlackboardAttribute> getAttributes() throws TskCoreException { * attribute type. * * @param attributeType the type of attributes to get + * * @return a list of attributes of the given type + * * @throws TskCoreException if a critical error occurs and the attributes - * are not fetched + * are not fetched * @deprecated There should not be multiple attributes of a type on an * artifact. Use getAttribute(BlackboardAttribute.Type) instead. */ @@ -477,10 +487,12 @@ public List<BlackboardAttribute> getAttributes(final BlackboardAttribute.ATTRIBU * Gets the attribute of this artifact of given type. * * @param attributeType The type of attribute to get + * * @return The attribute of that type, returns null if there is no attribute - * of that type. + * of that type. + * * @throws TskCoreException if a critical error occurs and the attributes - * are not fetched + * are not fetched */ public BlackboardAttribute getAttribute(BlackboardAttribute.Type attributeType) throws TskCoreException { List<BlackboardAttribute> attributes = this.getAttributes(); @@ -497,7 +509,8 @@ public BlackboardAttribute getAttribute(BlackboardAttribute.Type attributeType) * algorithm on this object * * @param <T> the object type to be returned from visit() - * @param v the visitor to accept + * @param v the visitor to accept + * * @return object of generic type T to return */ @Override diff --git a/bindings/java/src/org/sleuthkit/datamodel/BlackboardAttribute.java b/bindings/java/src/org/sleuthkit/datamodel/BlackboardAttribute.java index 15a391cd909813ccc6568a3e957f17f69c80c903..520131ab7ffabb5ea7b9d14723ff4937e785c201 100755 --- a/bindings/java/src/org/sleuthkit/datamodel/BlackboardAttribute.java +++ b/bindings/java/src/org/sleuthkit/datamodel/BlackboardAttribute.java @@ -65,10 +65,10 @@ public static final class Type implements Serializable { /** * Constructs an attribute type. * - * @param typeID The type id. - * @param typeName The type name. + * @param typeID The type id. + * @param typeName The type name. * @param displayName The display name for the type. - * @param valueType The type of the value. + * @param valueType The type of the value. */ public Type(int typeID, String typeName, String displayName, TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE valueType) { this.typeID = typeID; @@ -81,7 +81,7 @@ public Type(int typeID, String typeName, String displayName, TSK_BLACKBOARD_ATTR * Constructs a standard attribute type. * * @param type The specification of the type provided by the - * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE enumeration. + * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE enumeration. */ public Type(BlackboardAttribute.ATTRIBUTE_TYPE type) { this.typeID = type.getTypeID(); @@ -142,6 +142,7 @@ public boolean equals(Object that) { * attribute type object. * * @param that the other type + * * @return true if it is the same type */ private boolean sameType(BlackboardAttribute.Type that) { @@ -205,14 +206,14 @@ public enum TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE { private final long typeId; private final String typeName; /* - * TODO (AUT-2070): Add a localized displayName field and a + * TODO (AUT-2070): Add a localized displayName field and a * getDisplayName method for API consistency. */ /** * Constructs an attribute value type object. * - * @param type The type id of the value type. + * @param type The type id of the value type. * @param typeName The type name of the value type. */ private TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE(long type, String typeName) { @@ -244,10 +245,12 @@ public String getLabel() { * Gets the attribute value type for a given value type id. * * @param typeId A value type id. + * * @return A BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE - * object. + * object. + * * @throws IllegalArgumentException If the given type id does not map to - * a supported value type. + * a supported value type. * * TODO (AUT-2070): Deprecate and provide a fromTypeId method instead * for API consistency. @@ -265,10 +268,12 @@ static public TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE fromType(long typeId) { * Gets the attribute value type for a given value type name. * * @param typeName A type name. + * * @return A BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE - * object. + * object. + * * @throws IllegalArgumentException If the given type name does not map - * to a supported value type. + * to a supported value type. * * TODO (AUT-2070): Deprecate and provide a fromTypeName method instead * for API consistency. @@ -650,10 +655,10 @@ public enum ATTRIBUTE_TYPE { /** * Constructs a standard attribute type. * - * @param typeID The id of the type. - * @param typeName The name of the type. + * @param typeID The id of the type. + * @param typeName The name of the type. * @param displayName The display name of the type - * @param valueType The value type of the type. + * @param valueType The value type of the type. */ private ATTRIBUTE_TYPE(int typeID, String typeName, String displayName, TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE valueType) { this.typeID = typeID; @@ -705,9 +710,11 @@ public TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE getValueType() { * Gets the standard attribute type for a given type id. * * @param typeID A standard attribute type id. + * * @return A BlackboardAttribute.ATTRIBUTE_TYPE object. + * * @throws IllegalArgumentException If the given type id does not map to - * a standard attribute type. + * a standard attribute type. * * TODO (AUT-2070): Deprecate and provide a fromTypeId method instead * for API consistency. @@ -725,9 +732,11 @@ static public ATTRIBUTE_TYPE fromID(int typeID) { * Gets the standard attribute type for a given type name. * * @param typeName A standard attribute type name. + * * @return A BlackboardAttribute.ATTRIBUTE_TYPE object. + * * @throws IllegalArgumentException If the given type name does not map - * to a standard attribute type. + * to a standard attribute type. * * TODO (AUT-2070): Deprecate and provide a fromTypeName method instead * for API consistency. @@ -748,19 +757,19 @@ static public ATTRIBUTE_TYPE fromLabel(String typeName) { * based on a query of the blackboard _attributes table in the case * database. * - * @param artifactID The artifact id for this attribute + * @param artifactID The artifact id for this attribute * @param attributeTypeID The attribute type id. - * @param moduleName The display name of the module that created this - * attribute. - * @param context Contextual information about this attribute. - * @param valueType The attribute value type. - * @param valueInt The value from the the value_int32 column. - * @param valueLong The value from the the value_int64 column. - * @param valueDouble The value from the the value_double column. - * @param valueString The value from the the value_text column. - * @param valueBytes The value from the the value_byte column. - * @param sleuthkitCase A reference to the SleuthkitCase object representing - * the case database. + * @param moduleName The display name of the module that created this + * attribute. + * @param context Contextual information about this attribute. + * @param valueType The attribute value type. + * @param valueInt The value from the the value_int32 column. + * @param valueLong The value from the the value_int64 column. + * @param valueDouble The value from the the value_double column. + * @param valueString The value from the the value_text column. + * @param valueBytes The value from the the value_byte column. + * @param sleuthkitCase A reference to the SleuthkitCase object + * representing the case database. */ BlackboardAttribute(long artifactID, BlackboardAttribute.Type attributeType, String moduleName, String context, int valueInt, long valueLong, double valueDouble, String valueString, byte[] valueBytes, SleuthkitCase sleuthkitCase) { @@ -809,11 +818,13 @@ void setCaseDatabase(SleuthkitCase sleuthkitCase) { * should be added to an appropriate artifact. * * @param attributeType The standard attribute type. - * @param moduleName The display name of the module creating this attribute. - * @param valueInt The attribute value. + * @param moduleName The display name of the module creating this + * attribute. + * @param valueInt The attribute value. + * * @throws IllegalArgumentException If the value type of the specified - * standard attribute type is not - * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.INTEGER. + * standard attribute type is not + * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.INTEGER. */ public BlackboardAttribute(ATTRIBUTE_TYPE attributeType, String moduleName, int valueInt) throws IllegalArgumentException { if (attributeType.getValueType() != TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.INTEGER) { @@ -835,10 +846,13 @@ public BlackboardAttribute(ATTRIBUTE_TYPE attributeType, String moduleName, int * added to an appropriate artifact. * * @param attributeType The attribute type. - * @param moduleName The display name of the module creating this attribute. - * @param valueInt The attribute value. + * @param moduleName The display name of the module creating this + * attribute. + * @param valueInt The attribute value. + * * @throws IllegalArgumentException If the value type of the specified - * attribute type is not TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.INTEGER. + * attribute type is not + * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.INTEGER. */ public BlackboardAttribute(Type attributeType, String moduleName, int valueInt) throws IllegalArgumentException { if (attributeType.getValueType() != TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.INTEGER) { @@ -861,11 +875,15 @@ public BlackboardAttribute(Type attributeType, String moduleName, int valueInt) * should be added to an appropriate artifact. * * @param attributeType The standard attribute type. - * @param moduleName The display name of the module creating this attribute. - * @param valueLong The attribute value. + * @param moduleName The display name of the module creating this + * attribute. + * @param valueLong The attribute value. + * * @throws IllegalArgumentException If the value type of the specified - * standard attribute type is not TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.LONG - * or TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DATETIME. + * standard attribute type is not + * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.LONG + * or + * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DATETIME. */ public BlackboardAttribute(ATTRIBUTE_TYPE attributeType, String moduleName, long valueLong) throws IllegalArgumentException { @@ -889,12 +907,15 @@ public BlackboardAttribute(ATTRIBUTE_TYPE attributeType, String moduleName, * be added to an appropriate artifact. * * @param attributeType The attribute type. - * @param moduleName The display name of the module that creating this - * attribute. - * @param valueLong The attribute value. + * @param moduleName The display name of the module that creating this + * attribute. + * @param valueLong The attribute value. + * * @throws IllegalArgumentException If the value type of the specified - * standard attribute type is not TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.LONG - * or TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DATETIME. + * standard attribute type is not + * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.LONG + * or + * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DATETIME. */ public BlackboardAttribute(Type attributeType, String moduleName, long valueLong) throws IllegalArgumentException { if (attributeType.getValueType() != TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.LONG @@ -917,11 +938,13 @@ public BlackboardAttribute(Type attributeType, String moduleName, long valueLong * be added to an appropriate artifact. * * @param attributeType The standard attribute type. - * @param moduleName The display name of the module creating this attribute. - * @param valueDouble The attribute value. + * @param moduleName The display name of the module creating this + * attribute. + * @param valueDouble The attribute value. + * * @throws IllegalArgumentException If the value type of the specified - * standard attribute type is not - * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DOUBLE. + * standard attribute type is not + * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DOUBLE. */ public BlackboardAttribute(ATTRIBUTE_TYPE attributeType, String moduleName, double valueDouble) throws IllegalArgumentException { @@ -945,10 +968,13 @@ public BlackboardAttribute(ATTRIBUTE_TYPE attributeType, String moduleName, * added to an appropriate artifact. * * @param attributeType The attribute type. - * @param moduleName The display name of the module creating this attribute. - * @param valueDouble The attribute value. + * @param moduleName The display name of the module creating this + * attribute. + * @param valueDouble The attribute value. + * * @throws IllegalArgumentException If the value type of the specified - * attribute type is not TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DOUBLE. + * attribute type is not + * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DOUBLE. */ public BlackboardAttribute(Type attributeType, String moduleName, double valueDouble) throws IllegalArgumentException { if (attributeType.getValueType() != TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DOUBLE) { @@ -970,11 +996,13 @@ public BlackboardAttribute(Type attributeType, String moduleName, double valueDo * should be added to an appropriate artifact. * * @param attributeType The standard attribute type. - * @param moduleName The display name of the module creating this attribute. - * @param valueString The attribute value. + * @param moduleName The display name of the module creating this + * attribute. + * @param valueString The attribute value. + * * @throws IllegalArgumentException If the value type of the specified - * standard attribute type is not - * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING. + * standard attribute type is not + * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING. */ public BlackboardAttribute(ATTRIBUTE_TYPE attributeType, String moduleName, String valueString) throws IllegalArgumentException { @@ -1001,10 +1029,13 @@ public BlackboardAttribute(ATTRIBUTE_TYPE attributeType, String moduleName, * added to an appropriate artifact. * * @param attributeType The attribute type. - * @param moduleName The display name of the module creating this attribute. - * @param valueString The attribute value. + * @param moduleName The display name of the module creating this + * attribute. + * @param valueString The attribute value. + * * @throws IllegalArgumentException If the value type of the specified - * attribute type is not TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING. + * attribute type is not + * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING. */ public BlackboardAttribute(Type attributeType, String moduleName, String valueString) throws IllegalArgumentException { if (attributeType.getValueType() != TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING) { @@ -1030,10 +1061,13 @@ public BlackboardAttribute(Type attributeType, String moduleName, String valueSt * should be added to an appropriate artifact. * * @param attributeType The standard attribute type. - * @param moduleName The display name of the module creating this attribute. - * @param valueBytes The attribute value. + * @param moduleName The display name of the module creating this + * attribute. + * @param valueBytes The attribute value. + * * @throws IllegalArgumentException If the value type of the specified - * standard attribute type is not TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.BYTE. + * standard attribute type is not + * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.BYTE. */ public BlackboardAttribute(ATTRIBUTE_TYPE attributeType, String moduleName, byte[] valueBytes) throws IllegalArgumentException { @@ -1060,10 +1094,13 @@ public BlackboardAttribute(ATTRIBUTE_TYPE attributeType, String moduleName, * added to an appropriate artifact. * * @param attributeType The attribute type. - * @param moduleName The display name of the module creating this attribute. - * @param valueBytes The attribute value. + * @param moduleName The display name of the module creating this + * attribute. + * @param valueBytes The attribute value. + * * @throws IllegalArgumentException If the value type of the specified - * attribute type is not TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.BYTE. + * attribute type is not + * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.BYTE. */ public BlackboardAttribute(Type attributeType, String moduleName, byte[] valueBytes) throws IllegalArgumentException { if (attributeType.getValueType() != TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.BYTE) { @@ -1178,8 +1215,10 @@ public String getModuleName() { * attributes associated with the artifact. * * @return The artifact. + * * @throws TskCoreException If there is no artifact associated with this - * attribute or there is an error reading from the case database. + * attribute or there is an error reading from the + * case database. */ public BlackboardArtifact getParentArtifact() throws TskCoreException { return sleuthkitCase.getBlackboardArtifact(artifactID); @@ -1249,6 +1288,7 @@ public String getDisplayString() { * Converts a byte array to a string. * * @param bytes The byte array. + * * @return The string. */ final protected static char[] hexArray = "0123456789ABCDEF".toCharArray(); @@ -1268,6 +1308,7 @@ private static String bytesToHexString(byte[] bytes) { * Replace all NUL characters in the string with the SUB character * * @param text The input string. + * * @return The output string. */ private String replaceNulls(String text) { @@ -1279,12 +1320,15 @@ private String replaceNulls(String text) { * be added to an appropriate artifact. * * @param attributeTypeID The standard attribute type id. - * @param moduleName The display name of the module creating this attribute. - * @param valueInt The attribute value. + * @param moduleName The display name of the module creating this + * attribute. + * @param valueInt The attribute value. + * * @throws IllegalArgumentException If the value type of the specified - * standard attribute type is not - * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.INTEGER or the type id is not for a - * standard type. + * standard attribute type is not + * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.INTEGER + * or the type id is not for a standard + * type. * @deprecated */ @Deprecated @@ -1297,13 +1341,16 @@ public BlackboardAttribute(int attributeTypeID, String moduleName, int valueInt) * be added to an appropriate artifact. * * @param attributeTypeID The standard attribute type id. - * @param moduleName The display name of the module creating this attribute. - * @param context Extra information about the attribute. - * @param valueInt The attribute value. + * @param moduleName The display name of the module creating this + * attribute. + * @param context Extra information about the attribute. + * @param valueInt The attribute value. + * * @throws IllegalArgumentException If the value type of the specified - * standard attribute type is not - * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.INTEGER or the type id is not for a - * standard type. + * standard attribute type is not + * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.INTEGER + * or the type id is not for a standard + * type. * @deprecated */ @Deprecated @@ -1318,13 +1365,17 @@ public BlackboardAttribute(int attributeTypeID, String moduleName, String contex * should be added to an appropriate artifact. * * @param attributeTypeID The standard attribute type id. - * @param moduleName The display name of the module that creating this - * attribute. - * @param valueLong The attribute value. + * @param moduleName The display name of the module that creating this + * attribute. + * @param valueLong The attribute value. + * * @throws IllegalArgumentException If the value type of the specified - * standard attribute type is not TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.LONG - * or TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DATETIME or the type id is not for - * a standard type. + * standard attribute type is not + * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.LONG + * or + * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DATETIME + * or the type id is not for a standard + * type. */ @Deprecated public BlackboardAttribute(int attributeTypeID, String moduleName, @@ -1337,14 +1388,18 @@ public BlackboardAttribute(int attributeTypeID, String moduleName, * should be added to an appropriate artifact. * * @param attributeTypeID The standard attribute type id. - * @param moduleName The display name of the module that creating this - * attribute. - * @param context Extra information about the attribute. - * @param valueLong The attribute value. + * @param moduleName The display name of the module that creating this + * attribute. + * @param context Extra information about the attribute. + * @param valueLong The attribute value. + * * @throws IllegalArgumentException If the value type of the specified - * standard attribute type is not TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.LONG - * or TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DATETIME or the type id is not for - * a standard type. + * standard attribute type is not + * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.LONG + * or + * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DATETIME + * or the type id is not for a standard + * type. */ @Deprecated public BlackboardAttribute(int attributeTypeID, String moduleName, String context, @@ -1358,11 +1413,15 @@ public BlackboardAttribute(int attributeTypeID, String moduleName, String contex * added to an appropriate artifact. * * @param attributeTypeID The standard attribute type id. - * @param moduleName The display name of the module creating this attribute. - * @param valueDouble The attribute value. + * @param moduleName The display name of the module creating this + * attribute. + * @param valueDouble The attribute value. + * * @throws IllegalArgumentException If the value type of the specified - * standard attribute type is not TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DOUBLE - * or the type id is not for a standard type. + * standard attribute type is not + * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DOUBLE + * or the type id is not for a standard + * type. * @deprecated */ @Deprecated @@ -1376,12 +1435,16 @@ public BlackboardAttribute(int attributeTypeID, String moduleName, * added to an appropriate artifact. * * @param attributeTypeID The standard attribute type id. - * @param moduleName The display name of the module creating this attribute. - * @param context Extra information about the attribute. - * @param valueDouble The attribute value. + * @param moduleName The display name of the module creating this + * attribute. + * @param context Extra information about the attribute. + * @param valueDouble The attribute value. + * * @throws IllegalArgumentException If the value type of the specified - * standard attribute type is not TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DOUBLE - * or the type id is not for a standard type. + * standard attribute type is not + * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.DOUBLE + * or the type id is not for a standard + * type. * @deprecated */ @Deprecated @@ -1396,11 +1459,15 @@ public BlackboardAttribute(int attributeTypeID, String moduleName, String contex * added to an appropriate artifact. * * @param attributeTypeID The standard attribute type id. - * @param moduleName The display name of the module creating this attribute. - * @param valueString The attribute value. + * @param moduleName The display name of the module creating this + * attribute. + * @param valueString The attribute value. + * * @throws IllegalArgumentException If the value type of the specified - * standard attribute type is not TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING - * or the type id is not for a standard type. + * standard attribute type is not + * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING + * or the type id is not for a standard + * type. * @deprecated */ @Deprecated @@ -1413,12 +1480,16 @@ public BlackboardAttribute(int attributeTypeID, String moduleName, String valueS * added to an appropriate artifact. * * @param attributeTypeID The standard attribute type id. - * @param moduleName The display name of the module creating this attribute. - * @param context Extra information about the attribute. - * @param valueString The attribute value. + * @param moduleName The display name of the module creating this + * attribute. + * @param context Extra information about the attribute. + * @param valueString The attribute value. + * * @throws IllegalArgumentException If the value type of the specified - * standard attribute type is not TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING - * or the type id is not for a standard type. + * standard attribute type is not + * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.STRING + * or the type id is not for a standard + * type. * @deprecated */ @Deprecated @@ -1433,11 +1504,15 @@ public BlackboardAttribute(int attributeTypeID, String moduleName, String contex * should be added to an appropriate artifact. * * @param attributeTypeID The standard attribute type id. - * @param moduleName The display name of the module creating this attribute. - * @param valueBytes The attribute value. + * @param moduleName The display name of the module creating this + * attribute. + * @param valueBytes The attribute value. + * * @throws IllegalArgumentException If the value type of the specified - * standard attribute type is not TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.BYTE - * or the type id is not for a standard type. + * standard attribute type is not + * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.BYTE + * or the type id is not for a standard + * type. * @deprecated */ @Deprecated @@ -1450,12 +1525,16 @@ public BlackboardAttribute(int attributeTypeID, String moduleName, byte[] valueB * should be added to an appropriate artifact. * * @param attributeTypeID The standard attribute type id. - * @param moduleName The display name of the module creating this attribute. - * @param context Extra information about the attribute. - * @param valueBytes The attribute value. + * @param moduleName The display name of the module creating this + * attribute. + * @param context Extra information about the attribute. + * @param valueBytes The attribute value. + * * @throws IllegalArgumentException If the value type of the specified - * standard attribute type is not TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.BYTE - * or the type id is not for a standard type. + * standard attribute type is not + * TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.BYTE + * or the type id is not for a standard + * type. * @deprecated */ @Deprecated @@ -1469,6 +1548,7 @@ public BlackboardAttribute(int attributeTypeID, String moduleName, String contex * Sets the artifact id. * * @param artifactID The artifact id. + * * @deprecated The preferred method for doing this is to add the attribute * to a BlackboardArtifact object by calling BlackboardArtifact.addAttribute * or BlackboardArtifact.addAttributes, both of which post the attributes to @@ -1484,6 +1564,7 @@ protected void setArtifactID(long artifactID) { * database. * * @param sleuthkitCase A reference to a SleuthkitCase object. + * * @deprecated The preferred method for doing this is to add the attribute * to a BlackboardArtifact object by calling BlackboardArtifact.addAttribute * or BlackboardArtifact.addAttributes, both of which post the attributes to @@ -1498,6 +1579,7 @@ protected void setCase(SleuthkitCase sleuthkitCase) { * Gets the context of this attribute. * * @return The context, may be the empty string. + * * @deprecated Setting context for an attribute is deprecated. */ @Deprecated @@ -1519,6 +1601,7 @@ String getContextString() { * Gets the attribute type id. * * @return The type id. + * * @deprecated Use BlackboardAttribute.getAttributeType.getTypeID instead. */ @Deprecated @@ -1530,6 +1613,7 @@ public int getAttributeTypeID() { * Gets the attribute type name. * * @return The type name. + * * @deprecated Use BlackboardAttribute.getAttributeType.getTypeName instead. */ @Deprecated @@ -1541,6 +1625,7 @@ public String getAttributeTypeName() throws TskCoreException { * Gets the attribute type display name. * * @return type The display name. + * * @deprecated Use BlackboardAttribute.getAttributeType.getDisplayName * instead. */ diff --git a/bindings/java/src/org/sleuthkit/datamodel/CaseDbConnectionInfo.java b/bindings/java/src/org/sleuthkit/datamodel/CaseDbConnectionInfo.java index a474d996be82411d99ec3a20e75ea54eaa5692d3..dfbf496747582dad9ea5bb55b47e71cd176b4731 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/CaseDbConnectionInfo.java +++ b/bindings/java/src/org/sleuthkit/datamodel/CaseDbConnectionInfo.java @@ -44,10 +44,10 @@ public class CaseDbConnectionInfo { * information. * * @param hostNameOrIP the host name - * @param portNumber the port number - * @param userName the user name - * @param password the password - * @param dbType the database type + * @param portNumber the port number + * @param userName the user name + * @param password the password + * @param dbType the database type */ public CaseDbConnectionInfo(String hostNameOrIP, String portNumber, String userName, String password, DbType dbType) { this.hostNameOrIP = hostNameOrIP; diff --git a/bindings/java/src/org/sleuthkit/datamodel/Content.java b/bindings/java/src/org/sleuthkit/datamodel/Content.java index e4193bf05a0b1fa0293df6f3ec5d090c72f94bba..caa02b9338ce51eb361d3698d9f2cc61a372f614 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/Content.java +++ b/bindings/java/src/org/sleuthkit/datamodel/Content.java @@ -35,12 +35,14 @@ public interface Content extends SleuthkitVisitableItem { * Reads data that this content object is associated with (file contents, * volume contents, etc.). * - * @param buf a character array of data (in bytes) to copy read data to + * @param buf a character array of data (in bytes) to copy read data to * @param offset byte offset in the content to start reading from - * @param len number of bytes to read into buf. + * @param len number of bytes to read into buf. + * * @return num of bytes read, or -1 on error + * * @throws TskCoreException if critical error occurred during read in the - * tsk core + * tsk core */ public int read(byte[] buf, long offset, long len) throws TskCoreException; @@ -64,6 +66,7 @@ public interface Content extends SleuthkitVisitableItem { * Visitor pattern support * * @param v visitor supplying an algorithm to run on the content object + * * @return visitor return value resulting from running the algorithm */ public <T> T accept(ContentVisitor<T> v); @@ -77,8 +80,8 @@ public interface Content extends SleuthkitVisitableItem { /** * @return returns the full path to this Content object starting with a "/" - * followed by the Image name and similarly for all other segments in the - * hierarchy. + * followed by the Image name and similarly for all other segments + * in the hierarchy. */ public String getUniquePath() throws TskCoreException; @@ -95,6 +98,7 @@ public interface Content extends SleuthkitVisitableItem { * content. * * @return Content associated with data source or null if one can't be found + * * @throws TskCoreException if critical error occurred within tsk core */ public Content getDataSource() throws TskCoreException; @@ -103,6 +107,7 @@ public interface Content extends SleuthkitVisitableItem { * Gets the child content objects of this content. * * @return List of children + * * @throws TskCoreException if critical error occurred within tsk core */ public List<Content> getChildren() throws TskCoreException; @@ -112,6 +117,7 @@ public interface Content extends SleuthkitVisitableItem { * should be more efficient than getting children and checking it empty. * * @return true if has children, false otherwise. + * * @throws TskCoreException if critical error occurred within tsk core */ public boolean hasChildren() throws TskCoreException; @@ -121,13 +127,15 @@ public interface Content extends SleuthkitVisitableItem { * than getting children and counting them. * * @return children count + * * @throws TskCoreException if critical error occurred within tsk core */ public int getChildrenCount() throws TskCoreException; /** * @return returns the parent of this Content object or null if there isn't - * one as is the case for Image. + * one as is the case for Image. + * * @throws TskCoreException */ public Content getParent() throws TskCoreException; @@ -136,6 +144,7 @@ public interface Content extends SleuthkitVisitableItem { * Gets the child content ids of this content. * * @return List of children ids + * * @throws TskCoreException if critical error occurred within tsk core */ public List<Long> getChildrenIds() throws TskCoreException; @@ -144,9 +153,11 @@ public interface Content extends SleuthkitVisitableItem { * Create and add an artifact associated with this content to the blackboard * * @param artifactTypeID id of the artifact type (if the id doesn't already - * exist an exception will be thrown) + * exist an exception will be thrown) + * * @return the blackboard artifact created (the artifact type id can be - * looked up from this) + * looked up from this) + * * @throws TskCoreException if critical error occurred within tsk core */ public BlackboardArtifact newArtifact(int artifactTypeID) throws TskCoreException; @@ -155,8 +166,10 @@ public interface Content extends SleuthkitVisitableItem { * Create and add an artifact associated with this content to the blackboard * * @param type artifact enum tyoe + * * @return the blackboard artifact created (the artifact type id can be - * looked up from this) + * looked up from this) + * * @throws TskCoreException if critical error occurred within tsk core */ public BlackboardArtifact newArtifact(BlackboardArtifact.ARTIFACT_TYPE type) throws TskCoreException; @@ -166,7 +179,9 @@ public interface Content extends SleuthkitVisitableItem { * name * * @param artifactTypeName name of the type to look up + * * @return a list of blackboard artifacts matching the type + * * @throws TskCoreException if critical error occurred within tsk core */ public ArrayList<BlackboardArtifact> getArtifacts(String artifactTypeName) throws TskCoreException; @@ -176,6 +191,7 @@ public interface Content extends SleuthkitVisitableItem { * attributes can be added to it. Creates one if it does not already exist. * * @return Instance of the TSK_GEN_INFO artifact + * * @throws TskCoreException */ public BlackboardArtifact getGenInfoArtifact() throws TskCoreException; @@ -186,9 +202,11 @@ public interface Content extends SleuthkitVisitableItem { * on the create argument. * * @param create If true, an artifact will be created if it does not already - * exist. + * exist. + * * @return Instance of the TSK_GEN_INFO artifact or null if artifact does - * not already exist and create was set to false + * not already exist and create was set to false + * * @throws TskCoreException */ public BlackboardArtifact getGenInfoArtifact(boolean create) throws TskCoreException; @@ -197,7 +215,8 @@ public interface Content extends SleuthkitVisitableItem { * Return attributes of a given type from TSK_GEN_INFO. * * @param attr_type Attribute type to find inside of the TSK_GEN_INFO - * artifact. + * artifact. + * * @return Attributes */ public ArrayList<BlackboardAttribute> getGenInfoAttributes(BlackboardAttribute.ATTRIBUTE_TYPE attr_type) throws TskCoreException; @@ -207,7 +226,9 @@ public interface Content extends SleuthkitVisitableItem { * id * * @param artifactTypeID type id to look up + * * @return a list of blackboard artifacts matching the type + * * @throws TskCoreException if critical error occurred within tsk core */ public ArrayList<BlackboardArtifact> getArtifacts(int artifactTypeID) throws TskCoreException; @@ -216,7 +237,9 @@ public interface Content extends SleuthkitVisitableItem { * Get all artifacts associated with this content that have the given type * * @param type type to look up + * * @return a list of blackboard artifacts matching the type + * * @throws TskCoreException if critical error occurred within tsk core */ public ArrayList<BlackboardArtifact> getArtifacts(BlackboardArtifact.ARTIFACT_TYPE type) throws TskCoreException; @@ -225,6 +248,7 @@ public interface Content extends SleuthkitVisitableItem { * Get all artifacts associated with this content * * @return a list of blackboard artifacts + * * @throws TskCoreException if critical error occurred within tsk core */ public ArrayList<BlackboardArtifact> getAllArtifacts() throws TskCoreException; @@ -233,6 +257,7 @@ public interface Content extends SleuthkitVisitableItem { * Get the names of all the hashsets that this content is in. * * @return the names of the hashsets that this content is in + * * @throws TskCoreException if critical error occurred within tsk core */ public Set<String> getHashSetNames() throws TskCoreException; @@ -242,7 +267,9 @@ public interface Content extends SleuthkitVisitableItem { * given type name * * @param artifactTypeName name of the type to look up + * * @return count of blackboard artifacts matching the type + * * @throws TskCoreException if critical error occurred within tsk core */ public long getArtifactsCount(String artifactTypeName) throws TskCoreException; @@ -252,7 +279,9 @@ public interface Content extends SleuthkitVisitableItem { * given type id * * @param artifactTypeID type id to look up + * * @return count of blackboard artifacts matching the type + * * @throws TskCoreException if critical error occurred within tsk core */ public long getArtifactsCount(int artifactTypeID) throws TskCoreException; @@ -262,7 +291,9 @@ public interface Content extends SleuthkitVisitableItem { * given type * * @param type type to look up + * * @return count of blackboard artifacts matching the type + * * @throws TskCoreException if critical error occurred within tsk core */ public long getArtifactsCount(BlackboardArtifact.ARTIFACT_TYPE type) throws TskCoreException; @@ -271,6 +302,7 @@ public interface Content extends SleuthkitVisitableItem { * Get count of all artifacts associated with this content * * @return count of all blackboard artifacts for this content + * * @throws TskCoreException if critical error occurred within tsk core */ public long getAllArtifactsCount() throws TskCoreException; diff --git a/bindings/java/src/org/sleuthkit/datamodel/ContentVisitor.java b/bindings/java/src/org/sleuthkit/datamodel/ContentVisitor.java index b444f6e3bf686f12eec2ef27e07c2c87801c457b..409bb2d58d72d8aa1d6bf7a63e528fbfa403e064 100755 --- a/bindings/java/src/org/sleuthkit/datamodel/ContentVisitor.java +++ b/bindings/java/src/org/sleuthkit/datamodel/ContentVisitor.java @@ -35,6 +35,7 @@ public interface ContentVisitor<T> { * Act on (visit) a Directory content object * * @param d the directory to visit / act on + * * @return result of the visit */ T visit(Directory d); @@ -43,6 +44,7 @@ public interface ContentVisitor<T> { * Act on (visit) a File content object * * @param f File to visit / act on + * * @return result of the visit */ T visit(File f); @@ -51,6 +53,7 @@ public interface ContentVisitor<T> { * Act on (visit) a FileSystem content object * * @param fs file system to visit / act on + * * @return result of the visit */ T visit(FileSystem fs); @@ -59,6 +62,7 @@ public interface ContentVisitor<T> { * Act on (visit) an Image content object * * @param i image to visit / act on + * * @return result of the visit */ T visit(Image i); @@ -67,6 +71,7 @@ public interface ContentVisitor<T> { * Act on (visit) a Volume content object * * @param v volume to visit / act on + * * @return result of the visit */ T visit(Volume v); @@ -75,6 +80,7 @@ public interface ContentVisitor<T> { * Act on (visit) a VolumeSystem content object * * @param vs volume system to visit / act on + * * @return result of the visit */ T visit(VolumeSystem vs); @@ -83,6 +89,7 @@ public interface ContentVisitor<T> { * Act on (visit) a LayoutFile content object * * @param lf layout file to visit / act on + * * @return result of the visit */ T visit(LayoutFile lf); @@ -91,6 +98,7 @@ public interface ContentVisitor<T> { * Act on (visit) a LayoutDirectory content object * * @param ld layout dir to visit / act on + * * @return result of the visit */ T visit(VirtualDirectory ld); @@ -99,6 +107,7 @@ public interface ContentVisitor<T> { * Act on (visit) a DerivedFile content object * * @param lf local file to visit / act on + * * @return result of the visit */ T visit(DerivedFile lf); @@ -107,6 +116,7 @@ public interface ContentVisitor<T> { * Act on (visit) a LocalFile content object * * @param df derived file to visit / act on + * * @return result of the visit */ T visit(LocalFile df); @@ -119,7 +129,7 @@ public interface ContentVisitor<T> { * differently. * * @param <T> generic type, signifies the object type to be returned from - * visit() + * visit() */ static abstract public class Default<T> implements ContentVisitor<T> { diff --git a/bindings/java/src/org/sleuthkit/datamodel/DerivedFile.java b/bindings/java/src/org/sleuthkit/datamodel/DerivedFile.java index b17d1abad5671ab7803cfa09eab7ba072954d21b..c3e1c8205b2e5471e407142644a5065166512e46 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/DerivedFile.java +++ b/bindings/java/src/org/sleuthkit/datamodel/DerivedFile.java @@ -47,32 +47,39 @@ public class DerivedFile extends AbstractFile { * user's machine). A typical example of a derived file is a file extracted * from an archive file. * - * @param db The case database to which the file has been added. - * @param objId The object id of the file in the case database. + * @param db The case database to which the file has been + * added. + * @param objId The object id of the file in the case database. * @param dataSourceObjectId The object id of the data source for the file. - * @param name The name of the file. - * @param dirType The type of the file, usually as reported in the name - * structure of the file system. May be set to TSK_FS_NAME_TYPE_ENUM.UNDEF. - * @param metaType The type of the file, usually as reported in the metadata - * structure of the file system. May be set to - * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. - * @param dirFlag The allocated status of the file, usually as reported in - * the name structure of the file system. - * @param metaFlags The allocated status of the file, usually as reported in - * the metadata structure of the file system. - * @param size The size of the file. - * @param ctime The changed time of the file. - * @param crtime The created time of the file. - * @param atime The accessed time of the file. - * @param mtime The modified time of the file. - * @param md5Hash The MD5 hash of the file, null if not yet calculated. - * @param knownState The known state of the file from a hash database - * lookup, null if not yet looked up. - * @param parentPath The path of the parent of the file. - * @param localPath The absolute path of the file in secondary storage. - * @param parentId The object id of parent of the file. - * @param mimeType The MIME type of the file, null if it has not yet been - * determined. + * @param name The name of the file. + * @param dirType The type of the file, usually as reported in + * the name structure of the file system. May be + * set to TSK_FS_NAME_TYPE_ENUM.UNDEF. + * @param metaType The type of the file, usually as reported in + * the metadata structure of the file system. May + * be set to + * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. + * @param dirFlag The allocated status of the file, usually as + * reported in the name structure of the file + * system. + * @param metaFlags The allocated status of the file, usually as + * reported in the metadata structure of the file + * system. + * @param size The size of the file. + * @param ctime The changed time of the file. + * @param crtime The created time of the file. + * @param atime The accessed time of the file. + * @param mtime The modified time of the file. + * @param md5Hash The MD5 hash of the file, null if not yet + * calculated. + * @param knownState The known state of the file from a hash + * database lookup, null if not yet looked up. + * @param parentPath The path of the parent of the file. + * @param localPath The absolute path of the file in secondary + * storage. + * @param parentId The object id of parent of the file. + * @param mimeType The MIME type of the file, null if it has not + * yet been determined. */ DerivedFile(SleuthkitCase db, long objId, @@ -110,8 +117,9 @@ public boolean isRoot() { * Gets the derived files, if any, that are children of this derived file. * * @return A list of the children. + * * @throws TskCoreException if there was an error querying the case - * database. + * database. */ @Override public List<Content> getChildren() throws TskCoreException { @@ -123,8 +131,9 @@ public List<Content> getChildren() throws TskCoreException { * this derived file. * * @return A list of the children. + * * @throws TskCoreException if there was an error querying the case - * database. + * database. */ @Override public List<Long> getChildrenIds() throws TskCoreException { @@ -135,8 +144,9 @@ public List<Long> getChildrenIds() throws TskCoreException { * Gets the method used to derive this file, if it has been recorded. * * @return Derived method or null. + * * @throws TskCoreException if there was an error querying the case - * database. + * database. */ public synchronized DerivedMethod getDerivedMethod() throws TskCoreException { if (derivedMethod == null && hasDerivedMethod == true) { @@ -158,7 +168,8 @@ public synchronized DerivedMethod getDerivedMethod() throws TskCoreException { * Accepts a content visitor (Visitor design pattern). * * @param visitor A ContentVisitor supplying an algorithm to run using this - * derived file as input. + * derived file as input. + * * @return The output of the algorithm. */ @Override @@ -170,7 +181,8 @@ public <T> T accept(SleuthkitItemVisitor<T> v) { * Accepts a Sleuthkit item visitor (Visitor design pattern). * * @param visitor A SleuthkitItemVisitor supplying an algorithm to run using - * this derived file as input. + * this derived file as input. + * * @return The output of the algorithm. */ @Override @@ -196,9 +208,10 @@ protected void finalize() throws Throwable { * Provides a string representation of this derived file. * * @param preserveState True if state should be included in the string - * representation of this object. + * representation of this object. + * * @throws TskCoreException if there was an error querying the case - * database. + * database. */ @Override public String toString(boolean preserveState) { @@ -213,10 +226,10 @@ public String toString(boolean preserveState) { */ public static class DerivedMethod { - private final int derivedId; - private String toolName; - private String toolVersion; - private String other; + private final int derivedId; + private String toolName; + private String toolVersion; + private String other; private String rederiveDetails; public DerivedMethod(int derivedId, String rederiveDetails) { @@ -269,35 +282,37 @@ public String toString() { } /** - /** + * /** * Constructs a representation of a file or directory that has been derived * from another file and is stored outside of the data source (e.g., on a * user's machine). A typical example of a derived file is a file extracted * from an archive file. * - * @param db The case database to which the file has been added. - * @param objId The object id of the file in the case database. - * @param name The name of the file. - * @param dirType The type of the file, usually as reported in the name - * structure of the file system. May be set to TSK_FS_NAME_TYPE_ENUM.UNDEF. - * @param metaType The type of the file, usually as reported in the metadata - * structure of the file system. May be set to - * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. - * @param dirFlag The allocated status of the file, usually as reported in - * the name structure of the file system. - * @param metaFlags The allocated status of the file, usually as reported in - * the metadata structure of the file system. - * @param size The size of the file. - * @param ctime The changed time of the file. - * @param crtime The created time of the file. - * @param atime The accessed time of the file. - * @param mtime The modified time of the file. - * @param md5Hash The MD5 hash of the file, null if not yet calculated. + * @param db The case database to which the file has been added. + * @param objId The object id of the file in the case database. + * @param name The name of the file. + * @param dirType The type of the file, usually as reported in the name + * structure of the file system. May be set to + * TSK_FS_NAME_TYPE_ENUM.UNDEF. + * @param metaType The type of the file, usually as reported in the + * metadata structure of the file system. May be set to + * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. + * @param dirFlag The allocated status of the file, usually as reported + * in the name structure of the file system. + * @param metaFlags The allocated status of the file, usually as reported + * in the metadata structure of the file system. + * @param size The size of the file. + * @param ctime The changed time of the file. + * @param crtime The created time of the file. + * @param atime The accessed time of the file. + * @param mtime The modified time of the file. + * @param md5Hash The MD5 hash of the file, null if not yet calculated. * @param knownState The known state of the file from a hash database - * lookup, null if not yet looked up. + * lookup, null if not yet looked up. * @param parentPath The path of the parent of the file. - * @param localPath The absolute path of the file in secondary storage. - * @param parentId The object id of parent of the file. + * @param localPath The absolute path of the file in secondary storage. + * @param parentId The object id of parent of the file. + * * @deprecated Do not make subclasses outside of this package. */ @Deprecated diff --git a/bindings/java/src/org/sleuthkit/datamodel/Directory.java b/bindings/java/src/org/sleuthkit/datamodel/Directory.java index 82569ca4b22fed8aab4879797330fb86cd3bea6b..23fe1ac76f023df01ff716b9174ee5f44fb03d7a 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/Directory.java +++ b/bindings/java/src/org/sleuthkit/datamodel/Directory.java @@ -34,37 +34,45 @@ public class Directory extends FsContent { * Constructs a representation of a file system directory that has been * added to a case. * - * @param db The case database to which the file has been added. - * @param objId The object id of the file in the case database. + * @param db The case database to which the file has been + * added. + * @param objId The object id of the file in the case database. * @param dataSourceObjectId The object id of the data source for the file. - * @param fsObjId The object id of the file system to which this file - * belongs. - * @param attrType The type attribute given to the file by the file system. - * @param attrId The type id given to the file by the file system. - * @param name The name of the file. - * @param metaAddr The meta address of the file. - * @param metaSeq The meta sequence number of the file. - * @param dirType The type of the file, usually as reported in the name - * structure of the file system. May be set to TSK_FS_NAME_TYPE_ENUM.UNDEF. - * @param metaType The type of the file, usually as reported in the metadata - * structure of the file system. May be set to - * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. - * @param dirFlag The allocated status of the file, usually as reported in - * the name structure of the file system. - * @param metaFlags The allocated status of the file, usually as reported in - * the metadata structure of the file system. - * @param size The size of the file. - * @param ctime The changed time of the file. - * @param crtime The created time of the file. - * @param atime The accessed time of the file. - * @param mtime The modified time of the file. - * @param modes The modes for the file. - * @param uid The UID for the file. - * @param gid The GID for the file. - * @param md5Hash The MD5 hash of the file, null if not yet calculated. - * @param knownState The known state of the file from a hash database - * lookup, null if not yet looked up. - * @param parentPath The path of the parent of the file. + * @param fsObjId The object id of the file system to which this + * file belongs. + * @param attrType The type attribute given to the file by the + * file system. + * @param attrId The type id given to the file by the file + * system. + * @param name The name of the file. + * @param metaAddr The meta address of the file. + * @param metaSeq The meta sequence number of the file. + * @param dirType The type of the file, usually as reported in + * the name structure of the file system. May be + * set to TSK_FS_NAME_TYPE_ENUM.UNDEF. + * @param metaType The type of the file, usually as reported in + * the metadata structure of the file system. May + * be set to + * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. + * @param dirFlag The allocated status of the file, usually as + * reported in the name structure of the file + * system. + * @param metaFlags The allocated status of the file, usually as + * reported in the metadata structure of the file + * system. + * @param size The size of the file. + * @param ctime The changed time of the file. + * @param crtime The created time of the file. + * @param atime The accessed time of the file. + * @param mtime The modified time of the file. + * @param modes The modes for the file. + * @param uid The UID for the file. + * @param gid The GID for the file. + * @param md5Hash The MD5 hash of the file, null if not yet + * calculated. + * @param knownState The known state of the file from a hash + * database lookup, null if not yet looked up. + * @param parentPath The path of the parent of the file. */ Directory(SleuthkitCase db, long objId, @@ -86,8 +94,9 @@ public class Directory extends FsContent { * Gets the files, if any, that are children of this directory. * * @return A list of the children. + * * @throws TskCoreException if there was an error querying the case - * database. + * database. */ @Override public List<Content> getChildren() throws TskCoreException { @@ -99,8 +108,9 @@ public List<Content> getChildren() throws TskCoreException { * directory. * * @return A list of the children. + * * @throws TskCoreException if there was an error querying the case - * database. + * database. */ @Override public List<Long> getChildrenIds() throws TskCoreException { @@ -111,7 +121,8 @@ public List<Long> getChildrenIds() throws TskCoreException { * Accepts a content visitor (Visitor design pattern). * * @param visitor A ContentVisitor supplying an algorithm to run using this - * directory as input. + * directory as input. + * * @return The output of the algorithm. */ @Override @@ -123,7 +134,8 @@ public <T> T accept(SleuthkitItemVisitor<T> v) { * Accepts a Sleuthkit item visitor (Visitor design pattern). * * @param visitor A SleuthkitItemVisitor supplying an algorithm to run using - * this directory as input. + * this directory as input. + * * @return The output of the algorithm. */ @Override @@ -135,9 +147,10 @@ public <T> T accept(ContentVisitor<T> v) { * Provides a string representation of this directory. * * @param preserveState True if state should be included in the string - * representation of this object. + * representation of this object. + * * @throws TskCoreException if there was an error querying the case - * database. + * database. */ @Override public String toString(boolean preserveState) { @@ -148,36 +161,39 @@ public String toString(boolean preserveState) { * Constructs a representation of a file system directory that has been * added to a case. * - * @param db The case database to which the file has been added. - * @param objId The object id of the file in the case database. - * @param fsObjId The object id of the file system to which this file - * belongs. - * @param attrType The type attribute given to the file by the file system. - * @param attrId The type id given to the file by the file system. - * @param name The name of the file. - * @param metaAddr The meta address of the file. - * @param metaSeq The meta sequence number of the file. - * @param dirType The type of the file, usually as reported in the name - * structure of the file system. May be set to TSK_FS_NAME_TYPE_ENUM.UNDEF. - * @param metaType The type of the file, usually as reported in the metadata - * structure of the file system. May be set to - * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. - * @param dirFlag The allocated status of the file, usually as reported in - * the name structure of the file system. - * @param metaFlags The allocated status of the file, usually as reported in - * the metadata structure of the file system. - * @param size The size of the file. - * @param ctime The changed time of the file. - * @param crtime The created time of the file. - * @param atime The accessed time of the file. - * @param mtime The modified time of the file. - * @param modes The modes for the file. - * @param uid The UID for the file. - * @param gid The GID for the file. - * @param md5Hash The MD5 hash of the file, null if not yet calculated. + * @param db The case database to which the file has been added. + * @param objId The object id of the file in the case database. + * @param fsObjId The object id of the file system to which this file + * belongs. + * @param attrType The type attribute given to the file by the file + * system. + * @param attrId The type id given to the file by the file system. + * @param name The name of the file. + * @param metaAddr The meta address of the file. + * @param metaSeq The meta sequence number of the file. + * @param dirType The type of the file, usually as reported in the name + * structure of the file system. May be set to + * TSK_FS_NAME_TYPE_ENUM.UNDEF. + * @param metaType The type of the file, usually as reported in the + * metadata structure of the file system. May be set to + * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. + * @param dirFlag The allocated status of the file, usually as reported + * in the name structure of the file system. + * @param metaFlags The allocated status of the file, usually as reported + * in the metadata structure of the file system. + * @param size The size of the file. + * @param ctime The changed time of the file. + * @param crtime The created time of the file. + * @param atime The accessed time of the file. + * @param mtime The modified time of the file. + * @param modes The modes for the file. + * @param uid The UID for the file. + * @param gid The GID for the file. + * @param md5Hash The MD5 hash of the file, null if not yet calculated. * @param knownState The known state of the file from a hash database - * lookup, null if not yet looked up. + * lookup, null if not yet looked up. * @param parentPath The path of the parent of the file. + * * @deprecated Do not make subclasses outside of this package. */ @Deprecated diff --git a/bindings/java/src/org/sleuthkit/datamodel/File.java b/bindings/java/src/org/sleuthkit/datamodel/File.java index c0b5a5097274ebc629de9b09417c1466193ce007..c7a31df547164c5341f812c218473b9ad9e0b9df 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/File.java +++ b/bindings/java/src/org/sleuthkit/datamodel/File.java @@ -34,39 +34,47 @@ public class File extends FsContent { * Constructs a representation of a file system file that has been added to * the case. * - * @param db The case database to which the file has been added. - * @param objId The object id of the file in the case database. + * @param db The case database to which the file has been + * added. + * @param objId The object id of the file in the case database. * @param dataSourceObjectId The object id of the data source for the file. - * @param fsObjId The object id of the file system to which this file - * belongs. - * @param attrType The type attribute given to the file by the file system. - * @param attrId The type id given to the file by the file system. - * @param name The name of the file. - * @param metaAddr The meta address of the file. - * @param metaSeq The meta sequence number of the file. - * @param dirType The type of the file, usually as reported in the name - * structure of the file system. May be set to TSK_FS_NAME_TYPE_ENUM.UNDEF. - * @param metaType The type of the file, usually as reported in the metadata - * structure of the file system. May be set to - * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. - * @param dirFlag The allocated status of the file, usually as reported in - * the name structure of the file system. - * @param metaFlags The allocated status of the file, usually as reported in - * the metadata structure of the file system. - * @param size The size of the file. - * @param ctime The changed time of the file. - * @param crtime The created time of the file. - * @param atime The accessed time of the file. - * @param mtime The modified time of the file. - * @param modes The modes for the file. - * @param uid The UID for the file. - * @param gid The GID for the file. - * @param md5Hash The MD5 hash of the file, null if not yet calculated. - * @param knownState The known state of the file from a hash database - * lookup, null if not yet looked up. - * @param parentPath The path of the parent of the file. - * @param mimeType The MIME type of the file, null if it has not yet been - * determined. + * @param fsObjId The object id of the file system to which this + * file belongs. + * @param attrType The type attribute given to the file by the + * file system. + * @param attrId The type id given to the file by the file + * system. + * @param name The name of the file. + * @param metaAddr The meta address of the file. + * @param metaSeq The meta sequence number of the file. + * @param dirType The type of the file, usually as reported in + * the name structure of the file system. May be + * set to TSK_FS_NAME_TYPE_ENUM.UNDEF. + * @param metaType The type of the file, usually as reported in + * the metadata structure of the file system. May + * be set to + * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. + * @param dirFlag The allocated status of the file, usually as + * reported in the name structure of the file + * system. + * @param metaFlags The allocated status of the file, usually as + * reported in the metadata structure of the file + * system. + * @param size The size of the file. + * @param ctime The changed time of the file. + * @param crtime The created time of the file. + * @param atime The accessed time of the file. + * @param mtime The modified time of the file. + * @param modes The modes for the file. + * @param uid The UID for the file. + * @param gid The GID for the file. + * @param md5Hash The MD5 hash of the file, null if not yet + * calculated. + * @param knownState The known state of the file from a hash + * database lookup, null if not yet looked up. + * @param parentPath The path of the parent of the file. + * @param mimeType The MIME type of the file, null if it has not + * yet been determined. */ File(SleuthkitCase db, long objId, @@ -88,8 +96,9 @@ public class File extends FsContent { * Gets the derived files, if any, that are children of this file. * * @return A list of the children. + * * @throws TskCoreException if there was an error querying the case - * database. + * database. */ @Override public List<Content> getChildren() throws TskCoreException { @@ -101,8 +110,9 @@ public List<Content> getChildren() throws TskCoreException { * this file. * * @return A list of the children. + * * @throws TskCoreException if there was an error querying the case - * database. + * database. */ @Override public List<Long> getChildrenIds() throws TskCoreException { @@ -113,7 +123,8 @@ public List<Long> getChildrenIds() throws TskCoreException { * Accepts a content visitor (Visitor design pattern). * * @param visitor A ContentVisitor supplying an algorithm to run using this - * file as input. + * file as input. + * * @return The output of the algorithm. */ @Override @@ -125,7 +136,8 @@ public <T> T accept(SleuthkitItemVisitor<T> v) { * Accepts a Sleuthkit item visitor (Visitor design pattern). * * @param visitor A SleuthkitItemVisitor supplying an algorithm to run using - * this file as input. + * this file as input. + * * @return The output of the algorithm. */ @Override @@ -137,9 +149,10 @@ public <T> T accept(ContentVisitor<T> v) { * Provides a string representation of this file. * * @param preserveState True if state should be included in the string - * representation of this object. + * representation of this object. + * * @throws TskCoreException if there was an error querying the case - * database. + * database. */ @Override public String toString(boolean preserveState) { @@ -150,36 +163,39 @@ public String toString(boolean preserveState) { * Constructs a representation of a file system file that has been added to * the case. * - * @param db The case database to which the file has been added. - * @param objId The object id of the file in the case database. - * @param fsObjId The object id of the file system to which this file - * belongs. - * @param attrType The type attribute given to the file by the file system. - * @param attrId The type id given to the file by the file system. - * @param name The name of the file. - * @param metaAddr The meta address of the file. - * @param metaSeq The meta sequence number of the file. - * @param dirType The type of the file, usually as reported in the name - * structure of the file system. May be set to TSK_FS_NAME_TYPE_ENUM.UNDEF. - * @param metaType The type of the file, usually as reported in the metadata - * structure of the file system. May be set to - * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. - * @param dirFlag The allocated status of the file, usually as reported in - * the name structure of the file system. - * @param metaFlags The allocated status of the file, usually as reported in - * the metadata structure of the file system. - * @param size The size of the file. - * @param ctime The changed time of the file. - * @param crtime The created time of the file. - * @param atime The accessed time of the file. - * @param mtime The modified time of the file. - * @param modes The modes for the file. - * @param uid The UID for the file. - * @param gid The GID for the file. - * @param md5Hash The MD5 hash of the file, null if not yet calculated. + * @param db The case database to which the file has been added. + * @param objId The object id of the file in the case database. + * @param fsObjId The object id of the file system to which this file + * belongs. + * @param attrType The type attribute given to the file by the file + * system. + * @param attrId The type id given to the file by the file system. + * @param name The name of the file. + * @param metaAddr The meta address of the file. + * @param metaSeq The meta sequence number of the file. + * @param dirType The type of the file, usually as reported in the name + * structure of the file system. May be set to + * TSK_FS_NAME_TYPE_ENUM.UNDEF. + * @param metaType The type of the file, usually as reported in the + * metadata structure of the file system. May be set to + * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. + * @param dirFlag The allocated status of the file, usually as reported + * in the name structure of the file system. + * @param metaFlags The allocated status of the file, usually as reported + * in the metadata structure of the file system. + * @param size The size of the file. + * @param ctime The changed time of the file. + * @param crtime The created time of the file. + * @param atime The accessed time of the file. + * @param mtime The modified time of the file. + * @param modes The modes for the file. + * @param uid The UID for the file. + * @param gid The GID for the file. + * @param md5Hash The MD5 hash of the file, null if not yet calculated. * @param knownState The known state of the file from a hash database - * lookup, null if not yet looked up. + * lookup, null if not yet looked up. * @param parentPath The path of the parent of the file. + * * @deprecated Do not make subclasses outside of this package. */ @Deprecated diff --git a/bindings/java/src/org/sleuthkit/datamodel/FileSystem.java b/bindings/java/src/org/sleuthkit/datamodel/FileSystem.java index ad8f57791346e7140a2affa3d414463a762b9c1d..0b2e7e862a6d4375aa045f350fa268674804471a 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/FileSystem.java +++ b/bindings/java/src/org/sleuthkit/datamodel/FileSystem.java @@ -38,16 +38,16 @@ public class FileSystem extends AbstractContent { /** * Constructor most inputs are from the database * - * @param db the case handle - * @param obj_id the unique object id - * @param name filesystem name - * @param img_offset image offset - * @param fs_type filesystem type - * @param block_size block size in this fs + * @param db the case handle + * @param obj_id the unique object id + * @param name filesystem name + * @param img_offset image offset + * @param fs_type filesystem type + * @param block_size block size in this fs * @param block_count number of blocks in this fs - * @param root_inum the root inum - * @param first_inum the first inum - * @param last_inum the last inum + * @param root_inum the root inum + * @param first_inum the first inum + * @param last_inum the last inum */ protected FileSystem(SleuthkitCase db, long obj_id, String name, long img_offset, TskData.TSK_FS_TYPE_ENUM fs_type, long block_size, long block_count, long root_inum, @@ -82,8 +82,9 @@ public long getSize() { * this is called and maintains the handle to it to reuse it * * @return a filesystem pointer from the sleuthkit + * * @throws TskCoreException exception throw if an internal tsk core error - * occurs + * occurs */ long getFileSystemHandle() throws TskCoreException { if (filesystemHandle == 0) { diff --git a/bindings/java/src/org/sleuthkit/datamodel/FsContent.java b/bindings/java/src/org/sleuthkit/datamodel/FsContent.java index 65c9c4115fd041223da2657acf998423058d5dbe..0ab3363632f25a2e918033411a7618f3d293c72c 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/FsContent.java +++ b/bindings/java/src/org/sleuthkit/datamodel/FsContent.java @@ -63,39 +63,47 @@ public abstract class FsContent extends AbstractFile { * Constructs an abstract base class for representations of a file system * files or directories that have been added to a case. * - * @param db The case database to which the file has been added. - * @param objId The object id of the file in the case database. + * @param db The case database to which the file has been + * added. + * @param objId The object id of the file in the case database. * @param dataSourceObjectId The object id of the data source for the file. - * @param fsObjId The object id of the file system to which this file - * belongs. - * @param attrType The type attribute given to the file by the file system. - * @param attrId The type id given to the file by the file system. - * @param name The name of the file. - * @param metaAddr The meta address of the file. - * @param metaSeq The meta sequence number of the file. - * @param dirType The type of the file, usually as reported in the name - * structure of the file system. May be set to TSK_FS_NAME_TYPE_ENUM.UNDEF. - * @param metaType The type of the file, usually as reported in the metadata - * structure of the file system. May be set to - * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. - * @param dirFlag The allocated status of the file, usually as reported in - * the name structure of the file system. - * @param metaFlags The allocated status of the file, usually as reported in - * the metadata structure of the file system. - * @param size The size of the file. - * @param ctime The changed time of the file. - * @param crtime The created time of the file. - * @param atime The accessed time of the file. - * @param mtime The modified time of the file. - * @param modes The modes for the file. - * @param uid The UID for the file. - * @param gid The GID for the file. - * @param md5Hash The MD5 hash of the file, null if not yet calculated. - * @param knownState The known state of the file from a hash database - * lookup, null if not yet looked up. - * @param parentPath The path of the parent of the file. - * @param mimeType The MIME type of the file, null if it has not yet been - * determined. + * @param fsObjId The object id of the file system to which this + * file belongs. + * @param attrType The type attribute given to the file by the + * file system. + * @param attrId The type id given to the file by the file + * system. + * @param name The name of the file. + * @param metaAddr The meta address of the file. + * @param metaSeq The meta sequence number of the file. + * @param dirType The type of the file, usually as reported in + * the name structure of the file system. May be + * set to TSK_FS_NAME_TYPE_ENUM.UNDEF. + * @param metaType The type of the file, usually as reported in + * the metadata structure of the file system. May + * be set to + * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. + * @param dirFlag The allocated status of the file, usually as + * reported in the name structure of the file + * system. + * @param metaFlags The allocated status of the file, usually as + * reported in the metadata structure of the file + * system. + * @param size The size of the file. + * @param ctime The changed time of the file. + * @param crtime The created time of the file. + * @param atime The accessed time of the file. + * @param mtime The modified time of the file. + * @param modes The modes for the file. + * @param uid The UID for the file. + * @param gid The GID for the file. + * @param md5Hash The MD5 hash of the file, null if not yet + * calculated. + * @param knownState The known state of the file from a hash + * database lookup, null if not yet looked up. + * @param parentPath The path of the parent of the file. + * @param mimeType The MIME type of the file, null if it has not + * yet been determined. */ @SuppressWarnings("deprecation") FsContent(SleuthkitCase db, @@ -141,6 +149,7 @@ void setFileSystem(FileSystem parent) { * Gets the parent file system of this file or directory. * * @return the file system object of the parent + * * @throws org.sleuthkit.datamodel.TskCoreException */ @SuppressWarnings("deprecation") @@ -185,10 +194,12 @@ long getFileHandle() { /** * Reads bytes from this file or directory. * - * @param buf Buffer to read into. + * @param buf Buffer to read into. * @param offset Start position in the file. - * @param len Number of bytes to read. + * @param len Number of bytes to read. + * * @return Number of bytes read. + * * @throws TskCoreException if there is a problem reading the file. */ @Override @@ -229,8 +240,9 @@ public boolean isRoot() { * Gets the parent directory of this file or directory. * * @return The parent directory + * * @throws TskCoreException if there was an error querying the case - * database. + * database. */ public AbstractFile getParentDirectory() throws TskCoreException { return getSleuthkitCase().getParentDirectory(this); @@ -240,6 +252,7 @@ public AbstractFile getParentDirectory() throws TskCoreException { * Gets the data source (image) for this file or directory directory. * * @return The data source. + * * @throws TskCoreException if there is an error querying the case database. */ @Override @@ -271,6 +284,7 @@ public synchronized String getUniquePath() throws TskCoreException { * each type of file system. * * @return List of text, one element per line. + * * @throws TskCoreException */ public synchronized List<String> getMetaDataText() throws TskCoreException { @@ -324,9 +338,10 @@ public void finalize() throws Throwable { * Provides a string representation of this file or directory. * * @param preserveState True if state should be included in the string - * representation of this object. + * representation of this object. + * * @throws TskCoreException if there was an error querying the case - * database. + * database. */ @Override @SuppressWarnings("deprecation") @@ -343,36 +358,39 @@ public String toString(boolean preserveState) { * Constructs an abstract base class for representations of a file system * files or directories that have been added to a case. * - * @param db The case database to which the file has been added. - * @param objId The object id of the file in the case database. - * @param fsObjId The object id of the file system to which this file - * belongs. - * @param attrType The type attribute given to the file by the file system. - * @param attrId The type id given to the file by the file system. - * @param name The name of the file. - * @param metaAddr The meta address of the file. - * @param metaSeq The meta sequence number of the file. - * @param dirType The type of the file, usually as reported in the name - * structure of the file system. May be set to TSK_FS_NAME_TYPE_ENUM.UNDEF. - * @param metaType The type of the file, usually as reported in the metadata - * structure of the file system. May be set to - * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. - * @param dirFlag The allocated status of the file, usually as reported in - * the name structure of the file system. - * @param metaFlags The allocated status of the file, usually as reported in - * the metadata structure of the file system. - * @param size The size of the file. - * @param ctime The changed time of the file. - * @param crtime The created time of the file. - * @param atime The accessed time of the file. - * @param mtime The modified time of the file. - * @param modes The modes for the file. - * @param uid The UID for the file. - * @param gid The GID for the file. - * @param md5Hash The MD5 hash of the file, null if not yet calculated. + * @param db The case database to which the file has been added. + * @param objId The object id of the file in the case database. + * @param fsObjId The object id of the file system to which this file + * belongs. + * @param attrType The type attribute given to the file by the file + * system. + * @param attrId The type id given to the file by the file system. + * @param name The name of the file. + * @param metaAddr The meta address of the file. + * @param metaSeq The meta sequence number of the file. + * @param dirType The type of the file, usually as reported in the name + * structure of the file system. May be set to + * TSK_FS_NAME_TYPE_ENUM.UNDEF. + * @param metaType The type of the file, usually as reported in the + * metadata structure of the file system. May be set to + * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. + * @param dirFlag The allocated status of the file, usually as reported + * in the name structure of the file system. + * @param metaFlags The allocated status of the file, usually as reported + * in the metadata structure of the file system. + * @param size The size of the file. + * @param ctime The changed time of the file. + * @param crtime The created time of the file. + * @param atime The accessed time of the file. + * @param mtime The modified time of the file. + * @param modes The modes for the file. + * @param uid The UID for the file. + * @param gid The GID for the file. + * @param md5Hash The MD5 hash of the file, null if not yet calculated. * @param knownState The known state of the file from a hash database - * lookup, null if not yet looked up. + * lookup, null if not yet looked up. * @param parentPath The path of the parent of the file. + * * @deprecated Do not make subclasses outside of this package. */ @Deprecated diff --git a/bindings/java/src/org/sleuthkit/datamodel/HashUtility.java b/bindings/java/src/org/sleuthkit/datamodel/HashUtility.java index c5880e0cf0e75045c1308b7a18e865ea3bc9f67b..b25700e5c3a8d501d2dc651991096f170914f0b1 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/HashUtility.java +++ b/bindings/java/src/org/sleuthkit/datamodel/HashUtility.java @@ -38,6 +38,7 @@ public class HashUtility { * database * * @param file file object whose md5 hash we want to calculate + * * @return md5 of the given FsContent object */ static public String calculateMd5(AbstractFile file) throws IOException { @@ -76,6 +77,7 @@ static public String calculateMd5(AbstractFile file) throws IOException { * false positives. * * @param md5 + * * @return True if it is the empty hash value */ public static boolean isNoDataMd5(String md5) { diff --git a/bindings/java/src/org/sleuthkit/datamodel/Image.java b/bindings/java/src/org/sleuthkit/datamodel/Image.java index 28451047c23ea1eb134c47448cd140eb8b38bf76..053233f389e3a21269cd2abcd34269186818886e 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/Image.java +++ b/bindings/java/src/org/sleuthkit/datamodel/Image.java @@ -45,11 +45,11 @@ public class Image extends AbstractContent { /** * constructor most inputs are from the database * - * @param db database object + * @param db database object * @param obj_id * @param type - * @param ssize Sector Size - * @param name Display Name + * @param ssize Sector Size + * @param name Display Name * @param paths * @param timezone * @param md5 @@ -155,6 +155,7 @@ public String[] getPaths() { /** * @return a list of VolumeSystem associated with this Image. + * * @throws TskCoreException */ public List<VolumeSystem> getVolumeSystems() throws TskCoreException { @@ -172,6 +173,7 @@ public List<VolumeSystem> getVolumeSystems() throws TskCoreException { /** * @return a list of Volume associated with this Image. + * * @throws TskCoreException */ public List<Volume> getVolumes() throws TskCoreException { @@ -189,8 +191,9 @@ public List<Volume> getVolumes() throws TskCoreException { /** * @return a list of FileSystems in this Image. This includes FileSystems - * that are both children of this Image as well as children of Volumes in - * this image. + * that are both children of this Image as well as children of + * Volumes in this image. + * * @throws TskCoreException */ public List<FileSystem> getFileSystems() throws TskCoreException { diff --git a/bindings/java/src/org/sleuthkit/datamodel/LayoutFile.java b/bindings/java/src/org/sleuthkit/datamodel/LayoutFile.java index 7a760da6a5eb3af3d411ee14ed0e8ecdd07b9f41..d266689276405d592fbddada1bbddfefc949517e 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/LayoutFile.java +++ b/bindings/java/src/org/sleuthkit/datamodel/LayoutFile.java @@ -51,27 +51,33 @@ public class LayoutFile extends AbstractFile { * from blocks of data (e.g. unallocated) that are treated as files for * convenience and uniformity. * - * @param db The case database to which the file has been added. - * @param objId The object id of the file in the case database. + * @param db The case database to which the file has been + * added. + * @param objId The object id of the file in the case database. * @param dataSourceObjectId The object id of the data source for the file. - * @param name The name of the file. - * @param fileType The type of the file. - * @param dirType The type of the file, usually as reported in the name - * structure of the file system. May be set to TSK_FS_NAME_TYPE_ENUM.UNDEF. - * @param metaType The type of the file, usually as reported in the metadata - * structure of the file system. May be set to - * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. - * @param dirFlag The allocated status of the file, usually as reported in - * the name structure of the file system. - * @param metaFlags The allocated status of the file, usually as reported in - * the metadata structure of the file system. - * @param size The size of the file. - * @param md5Hash The MD5 hash of the file, null if not yet calculated. - * @param knownState The known state of the file from a hash database - * lookup, null if not yet looked up. - * @param parentPath The path of the parent of the file. - * @param mimeType The MIME type of the file, null if it has not yet been - * determined. + * @param name The name of the file. + * @param fileType The type of the file. + * @param dirType The type of the file, usually as reported in + * the name structure of the file system. May be + * set to TSK_FS_NAME_TYPE_ENUM.UNDEF. + * @param metaType The type of the file, usually as reported in + * the metadata structure of the file system. May + * be set to + * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. + * @param dirFlag The allocated status of the file, usually as + * reported in the name structure of the file + * system. + * @param metaFlags The allocated status of the file, usually as + * reported in the metadata structure of the file + * system. + * @param size The size of the file. + * @param md5Hash The MD5 hash of the file, null if not yet + * calculated. + * @param knownState The known state of the file from a hash + * database lookup, null if not yet looked up. + * @param parentPath The path of the parent of the file. + * @param mimeType The MIME type of the file, null if it has not + * yet been determined. */ LayoutFile(SleuthkitCase db, long objId, @@ -116,8 +122,9 @@ public boolean isRoot() { * Gets the derived files, if any, that are children of this file. * * @return A list of the children. + * * @throws TskCoreException if there was an error querying the case - * database. + * database. */ @Override public List<Content> getChildren() throws TskCoreException { @@ -129,8 +136,9 @@ public List<Content> getChildren() throws TskCoreException { * this file. * * @return A list of the children. + * * @throws TskCoreException if there was an error querying the case - * database. + * database. */ @Override public List<Long> getChildrenIds() throws TskCoreException { @@ -148,10 +156,12 @@ public void close() { /** * Reads bytes from the layout ranges associated with this file. * - * @param buf Buffer to read into. + * @param buf Buffer to read into. * @param offset Start position in the file. - * @param len Number of bytes to read. + * @param len Number of bytes to read. + * * @return Number of bytes read. + * * @throws TskCoreException if there is a problem reading the file. */ @Override @@ -196,11 +206,11 @@ protected int readInt(byte[] buf, long offset, long len) throws TskCoreException * Reads bytes from an image into a buffer, starting at given position in * buffer. * - * @param imgHandle The image to read from. - * @param buf The array to read into. - * @param offsetInBuf Where to start in the array. + * @param imgHandle The image to read from. + * @param buf The array to read into. + * @param offsetInBuf Where to start in the array. * @param offsetInImage Where to start in the image. - * @param lenToRead How far to read in the image. + * @param lenToRead How far to read in the image. */ private int readImgToOffset(long imgHandle, byte[] buf, int offsetInBuf, long offsetInImage, int lenToRead) throws TskCoreException { byte[] currentBuffer = new byte[lenToRead]; // the buffer for the current range object @@ -213,7 +223,8 @@ private int readImgToOffset(long imgHandle, byte[] buf, int offsetInBuf, long of * Accepts a content visitor (Visitor design pattern). * * @param visitor A ContentVisitor supplying an algorithm to run using this - * file as input. + * file as input. + * * @return The output of the algorithm. */ @Override @@ -225,7 +236,8 @@ public <T> T accept(ContentVisitor<T> v) { * Accepts a Sleuthkit item visitor (Visitor design pattern). * * @param visitor A SleuthkitItemVisitor supplying an algorithm to run using - * this file as input. + * this file as input. + * * @return The output of the algorithm. */ @Override @@ -237,9 +249,10 @@ public <T> T accept(SleuthkitItemVisitor<T> v) { * Provides a string representation of this file. * * @param preserveState True if state should be included in the string - * representation of this object. + * representation of this object. + * * @throws TskCoreException if there was an error querying the case - * database. + * database. */ @Override public String toString(boolean preserveState) { @@ -252,24 +265,26 @@ public String toString(boolean preserveState) { * from blocks of data (e.g. unallocated) that are treated as files for * convenience and uniformity. * - * @param db The case database to which the file has been added. - * @param objId The object id of the file in the case database. - * @param name The name of the file. - * @param fileType The type of the file. - * @param dirType The type of the file, usually as reported in the name - * structure of the file system. May be set to TSK_FS_NAME_TYPE_ENUM.UNDEF. - * @param metaType The type of the file, usually as reported in the metadata - * structure of the file system. May be set to - * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. - * @param dirFlag The allocated status of the file, usually as reported in - * the name structure of the file system. - * @param metaFlags The allocated status of the file, usually as reported in - * the metadata structure of the file system. - * @param size The size of the file. - * @param md5Hash The MD5 hash of the file, null if not yet calculated. + * @param db The case database to which the file has been added. + * @param objId The object id of the file in the case database. + * @param name The name of the file. + * @param fileType The type of the file. + * @param dirType The type of the file, usually as reported in the name + * structure of the file system. May be set to + * TSK_FS_NAME_TYPE_ENUM.UNDEF. + * @param metaType The type of the file, usually as reported in the + * metadata structure of the file system. May be set to + * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. + * @param dirFlag The allocated status of the file, usually as reported + * in the name structure of the file system. + * @param metaFlags The allocated status of the file, usually as reported + * in the metadata structure of the file system. + * @param size The size of the file. + * @param md5Hash The MD5 hash of the file, null if not yet calculated. * @param knownState The known state of the file from a hash database - * lookup, null if not yet looked up. + * lookup, null if not yet looked up. * @param parentPath The path of the parent of the file. + * * @deprecated Do not make subclasses outside of this package. */ @Deprecated diff --git a/bindings/java/src/org/sleuthkit/datamodel/LibraryUtils.java b/bindings/java/src/org/sleuthkit/datamodel/LibraryUtils.java index 1074ebb4999de2d29eeb821b6091976dd5794f5d..313f29986276de413efbc6cd4a4b5e1a1553f815 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/LibraryUtils.java +++ b/bindings/java/src/org/sleuthkit/datamodel/LibraryUtils.java @@ -129,6 +129,7 @@ private static boolean isLinux() { * Attempt to extract and load the specified native library. * * @param library + * * @return */ private static boolean loadNativeLibFromTskJar(Lib library) { diff --git a/bindings/java/src/org/sleuthkit/datamodel/LocalFile.java b/bindings/java/src/org/sleuthkit/datamodel/LocalFile.java index 4d67ec0cd93e29c6d49fe2bd2e3bd9e84721b124..a6409653200a71c181a35fb5d1ff30cf01d061a0 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/LocalFile.java +++ b/bindings/java/src/org/sleuthkit/datamodel/LocalFile.java @@ -37,33 +37,40 @@ public class LocalFile extends AbstractFile { * Constructs a representation of a local/logical file (e.g., on a user's * machine) that has been added to the case database. * - * @param db The case database to which the file has been added. - * @param objId The object id of the file in the case database. - * @param name The name of the file. - * @param fileType The type of the file. - * @param dirType The type of the file, usually as reported in the name - * structure of the file system. May be set to TSK_FS_NAME_TYPE_ENUM.UNDEF. - * @param metaType The type of the file, usually as reported in the metadata - * structure of the file system. May be set to - * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. - * @param dirFlag The allocated status of the file, usually as reported in - * the name structure of the file system. - * @param metaFlags The allocated status of the file, usually as reported in - * the metadata structure of the file system. - * @param size The size of the file. - * @param ctime The changed time of the file. - * @param crtime The created time of the file. - * @param atime The accessed time of the file. - * @param mtime The modified time of the file. - * @param mimeType The MIME type of the file, null if it has not yet been - * determined. - * @param md5Hash The MD5 hash of the file, null if not yet calculated. - * @param knownState The known state of the file from a hash database - * lookup, null if not yet looked up. - * @param parentId The object id of parent of the file. - * @param parentPath The path of the parent of the file. + * @param db The case database to which the file has been + * added. + * @param objId The object id of the file in the case database. + * @param name The name of the file. + * @param fileType The type of the file. + * @param dirType The type of the file, usually as reported in + * the name structure of the file system. May be + * set to TSK_FS_NAME_TYPE_ENUM.UNDEF. + * @param metaType The type of the file, usually as reported in + * the metadata structure of the file system. May + * be set to + * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. + * @param dirFlag The allocated status of the file, usually as + * reported in the name structure of the file + * system. + * @param metaFlags The allocated status of the file, usually as + * reported in the metadata structure of the file + * system. + * @param size The size of the file. + * @param ctime The changed time of the file. + * @param crtime The created time of the file. + * @param atime The accessed time of the file. + * @param mtime The modified time of the file. + * @param mimeType The MIME type of the file, null if it has not + * yet been determined. + * @param md5Hash The MD5 hash of the file, null if not yet + * calculated. + * @param knownState The known state of the file from a hash + * database lookup, null if not yet looked up. + * @param parentId The object id of parent of the file. + * @param parentPath The path of the parent of the file. * @param dataSourceObjectId The object id of the data source for the file. - * @param localPath The absolute path of the file in secondary storage. + * @param localPath The absolute path of the file in secondary + * storage. */ LocalFile(SleuthkitCase db, long objId, @@ -94,8 +101,9 @@ public class LocalFile extends AbstractFile { * data source, an empty list. * * @return An empty list of extents (TskFileRange objects) + * * @throws TskCoreException if there was an error querying the case - * database. + * database. */ @Override public List<TskFileRange> getRanges() throws TskCoreException { @@ -118,8 +126,9 @@ public boolean isRoot() { * file. * * @return A list of the children. + * * @throws TskCoreException if there was an error querying the case - * database. + * database. */ @Override public List<Content> getChildren() throws TskCoreException { @@ -134,8 +143,9 @@ public List<Content> getChildren() throws TskCoreException { * children of this local file. * * @return A list of the children. + * * @throws TskCoreException if there was an error querying the case - * database. + * database. */ @Override public List<Long> getChildrenIds() throws TskCoreException { @@ -149,7 +159,8 @@ public List<Long> getChildrenIds() throws TskCoreException { * Accepts a content visitor (Visitor design pattern). * * @param visitor A ContentVisitor supplying an algorithm to run using this - * local file as input. + * local file as input. + * * @return The output of the algorithm. */ @Override @@ -161,7 +172,8 @@ public <T> T accept(ContentVisitor<T> v) { * Accepts a Sleuthkit item visitor (Visitor design pattern). * * @param visitor A SleuthkitItemVisitor supplying an algorithm to run using - * this local file as input. + * this local file as input. + * * @return The output of the algorithm. */ @Override @@ -173,9 +185,10 @@ public <T> T accept(SleuthkitItemVisitor<T> v) { * Provides a string representation of this local file. * * @param preserveState True if state should be included in the string - * representation of this object. + * representation of this object. + * * @throws TskCoreException if there was an error querying the case - * database. + * database. */ @Override public String toString(boolean preserveState) { @@ -186,29 +199,31 @@ public String toString(boolean preserveState) { * Constructs a representation of a local/logical file (e.g., on a user's * machine) that has been added to the case database. * - * @param db The case database to which the file has been added. - * @param objId The object id of the file in the case database. - * @param name The name of the file. - * @param fileType The type of the file. - * @param dirType The type of the file, usually as reported in the name - * structure of the file system. May be set to TSK_FS_NAME_TYPE_ENUM.UNDEF. - * @param metaType The type of the file, usually as reported in the metadata - * structure of the file system. May be set to - * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. - * @param dirFlag The allocated status of the file, usually as reported in - * the name structure of the file system. - * @param metaFlags The allocated status of the file, usually as reported in - * the metadata structure of the file system. - * @param size The size of the file. - * @param ctime The changed time of the file. - * @param crtime The created time of the file. - * @param atime The accessed time of the file. - * @param mtime The modified time of the file. - * @param md5Hash The MD5 hash of the file, null if not yet calculated. + * @param db The case database to which the file has been added. + * @param objId The object id of the file in the case database. + * @param name The name of the file. + * @param fileType The type of the file. + * @param dirType The type of the file, usually as reported in the name + * structure of the file system. May be set to + * TSK_FS_NAME_TYPE_ENUM.UNDEF. + * @param metaType The type of the file, usually as reported in the + * metadata structure of the file system. May be set to + * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. + * @param dirFlag The allocated status of the file, usually as reported + * in the name structure of the file system. + * @param metaFlags The allocated status of the file, usually as reported + * in the metadata structure of the file system. + * @param size The size of the file. + * @param ctime The changed time of the file. + * @param crtime The created time of the file. + * @param atime The accessed time of the file. + * @param mtime The modified time of the file. + * @param md5Hash The MD5 hash of the file, null if not yet calculated. * @param knownState The known state of the file from a hash database - * lookup, null if not yet looked up. + * lookup, null if not yet looked up. * @param parentPath The path of the parent of the file. - * @param localPath The absolute path of the file in secondary storage. + * @param localPath The absolute path of the file in secondary storage. + * * @deprecated Do not make subclasses outside of this package. */ @Deprecated @@ -242,30 +257,32 @@ protected LocalFile(SleuthkitCase db, * Constructs a representation of a local/logical file (e.g., on a user's * machine) that has been added to the case database. * - * @param db The case database to which the file has been added. - * @param objId The object id of the file in the case database. - * @param name The name of the file. - * @param fileType The type of the file. - * @param dirType The type of the file, usually as reported in the name - * structure of the file system. May be set to TSK_FS_NAME_TYPE_ENUM.UNDEF. - * @param metaType The type of the file, usually as reported in the metadata - * structure of the file system. May be set to - * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. - * @param dirFlag The allocated status of the file, usually as reported in - * the name structure of the file system. - * @param metaFlags The allocated status of the file, usually as reported in - * the metadata structure of the file system. - * @param size The size of the file. - * @param ctime The changed time of the file. - * @param crtime The created time of the file. - * @param atime The accessed time of the file. - * @param mtime The modified time of the file. - * @param md5Hash The MD5 hash of the file, null if not yet calculated. + * @param db The case database to which the file has been added. + * @param objId The object id of the file in the case database. + * @param name The name of the file. + * @param fileType The type of the file. + * @param dirType The type of the file, usually as reported in the name + * structure of the file system. May be set to + * TSK_FS_NAME_TYPE_ENUM.UNDEF. + * @param metaType The type of the file, usually as reported in the + * metadata structure of the file system. May be set to + * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. + * @param dirFlag The allocated status of the file, usually as reported + * in the name structure of the file system. + * @param metaFlags The allocated status of the file, usually as reported + * in the metadata structure of the file system. + * @param size The size of the file. + * @param ctime The changed time of the file. + * @param crtime The created time of the file. + * @param atime The accessed time of the file. + * @param mtime The modified time of the file. + * @param md5Hash The MD5 hash of the file, null if not yet calculated. * @param knownState The known state of the file from a hash database - * lookup, null if not yet looked up. + * lookup, null if not yet looked up. * @param parentPath The path of the parent of the file. - * @param localPath The absolute path of the file in secondary storage. - * @param parentId The object id of parent of the file. + * @param localPath The absolute path of the file in secondary storage. + * @param parentId The object id of parent of the file. + * * @deprecated Do not make subclasses outside of this package. */ @Deprecated @@ -286,29 +303,31 @@ protected LocalFile(SleuthkitCase db, * Constructs a representation of a local/logical file (e.g., on a user's * machine) that has been added to the case. * - * @param db The case database to which the file has been added. - * @param objId The object id of the file in the case database. - * @param name The name of the file. - * @param dirType The type of the file, usually as reported in the name - * structure of the file system. May be set to TSK_FS_NAME_TYPE_ENUM.UNDEF. - * @param metaType The type of the file, usually as reported in the metadata - * structure of the file system. May be set to - * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. - * @param dirFlag The allocated status of the file, usually as reported in - * the name structure of the file system. - * @param metaFlags The allocated status of the file, usually as reported in - * the metadata structure of the file system. - * @param size The size of the file. - * @param ctime The changed time of the file. - * @param crtime The created time of the file. - * @param atime The accessed time of the file. - * @param mtime The modified time of the file. - * @param md5Hash The MD5 hash of the file, null if not yet calculated. + * @param db The case database to which the file has been added. + * @param objId The object id of the file in the case database. + * @param name The name of the file. + * @param dirType The type of the file, usually as reported in the name + * structure of the file system. May be set to + * TSK_FS_NAME_TYPE_ENUM.UNDEF. + * @param metaType The type of the file, usually as reported in the + * metadata structure of the file system. May be set to + * TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_UNDEF. + * @param dirFlag The allocated status of the file, usually as reported + * in the name structure of the file system. + * @param metaFlags The allocated status of the file, usually as reported + * in the metadata structure of the file system. + * @param size The size of the file. + * @param ctime The changed time of the file. + * @param crtime The created time of the file. + * @param atime The accessed time of the file. + * @param mtime The modified time of the file. + * @param md5Hash The MD5 hash of the file, null if not yet calculated. * @param knownState The known state of the file from a hash database - * lookup, null if not yet looked up. + * lookup, null if not yet looked up. * @param parentPath The path of the parent of the file. - * @param localPath The absolute path of the file in secondary storage. - * @param parentId The object id of parent of the file. + * @param localPath The absolute path of the file in secondary storage. + * @param parentId The object id of parent of the file. + * * @deprecated Do not make subclasses outside of this package. */ @Deprecated diff --git a/bindings/java/src/org/sleuthkit/datamodel/LocalFilesDataSource.java b/bindings/java/src/org/sleuthkit/datamodel/LocalFilesDataSource.java index 6c0a0f218d8e19e93190b2776f33dd7229820c8d..976ea4da2f3ffe15f48a5ccc3ba04d14c1929d6b 100755 --- a/bindings/java/src/org/sleuthkit/datamodel/LocalFilesDataSource.java +++ b/bindings/java/src/org/sleuthkit/datamodel/LocalFilesDataSource.java @@ -35,13 +35,13 @@ public class LocalFilesDataSource extends AbstractDataSource { /** * Constructs a local/logical files and/or directories data source. * - * @param deviceId An ASCII-printable identifier for the device associated - * with the data source that is intended to be unique across multiple cases - * (e.g., a UUID). + * @param deviceId An ASCII-printable identifier for the device + * associated with the data source that is intended to + * be unique across multiple cases (e.g., a UUID). * @param rootDirectory The virtual directory that is the root for the - * local/logical files and/or directories. - * @param timeZone Time zone used to process the data source, may be the - * empty string. + * local/logical files and/or directories. + * @param timeZone Time zone used to process the data source, may be + * the empty string. */ LocalFilesDataSource(String deviceId, VirtualDirectory rootDirectory, String timeZone) { super(rootDirectory.getId(), deviceId, timeZone); diff --git a/bindings/java/src/org/sleuthkit/datamodel/OSInfo.java b/bindings/java/src/org/sleuthkit/datamodel/OSInfo.java index 694df8ddaa56eca226b4a34b8794227da7078f33..8df3c56f96bb85568ab1422092489248ddff2a75 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/OSInfo.java +++ b/bindings/java/src/org/sleuthkit/datamodel/OSInfo.java @@ -51,13 +51,14 @@ public OSInfo() { /** * Initialize an OSInfo object * - * @param a_art - OSInfo artifact associated with one registry hive - * @param a_isBackup - True if the registry hive was found in a "RegBack" - * directory + * @param a_art - OSInfo artifact associated with one registry hive + * @param a_isBackup - True if the registry hive was found in a + * "RegBack" directory * @param a_fileSystemId - File system ID for FS containing the registry - * hive - * @param a_parent - Parent directory containing the registry hive. Can be - * null + * hive + * @param a_parent - Parent directory containing the registry hive. + * Can be null + * * @throws TskCoreException */ public OSInfo(BlackboardArtifact a_art, boolean a_isBackup, long a_fileSystemId, Content a_parent) throws TskCoreException { @@ -83,11 +84,12 @@ public OSInfo(BlackboardArtifact a_art, boolean a_isBackup, long a_fileSystemId, /** * Initialize an OSInfo object (without file system information) * - * @param a_art - OSInfo artifact associated with one registry hive + * @param a_art - OSInfo artifact associated with one registry hive * @param a_isBackup - True if the registry hive was found in a "RegBack" - * directory - * @param a_parent - Parent directory containing the registry hive. Can be - * null + * directory + * @param a_parent - Parent directory containing the registry hive. Can be + * null + * * @throws TskCoreException */ public OSInfo(BlackboardArtifact a_art, boolean a_isBackup, Content a_parent) throws TskCoreException { @@ -113,6 +115,7 @@ public OSInfo(BlackboardArtifact a_art, boolean a_isBackup, Content a_parent) th * Determine whether two OSInfo objects should be combined. * * @param a_osInfo - the OSInfo object to compare against + * * @return */ public boolean matches(OSInfo a_osInfo) { @@ -164,6 +167,7 @@ public boolean getIsBackup() { * Generic method to get an OSInfo attribute value by ATTRIBUTE_TYPE. * * @param attrType - the attribute to get + * * @return */ public String getAttributeValue(ATTRIBUTE_TYPE attrType) { diff --git a/bindings/java/src/org/sleuthkit/datamodel/OSUtility.java b/bindings/java/src/org/sleuthkit/datamodel/OSUtility.java index 18fa111e2f4171fa82c0c0fb8c248d06f7b8beca..7983170796dfdd9a309543ccc644304f4cb9ef51 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/OSUtility.java +++ b/bindings/java/src/org/sleuthkit/datamodel/OSUtility.java @@ -36,8 +36,10 @@ private OSUtility() { * Get all non-backup OSInfo data * * @param skCase - Have to pass this in because we don't have access to the - * normal method + * normal method + * * @return List of OSInfo objects + * * @throws TskCoreException */ public static List<OSInfo> getOSInfo(SleuthkitCase skCase) throws TskCoreException { @@ -49,10 +51,12 @@ public static List<OSInfo> getOSInfo(SleuthkitCase skCase) throws TskCoreExcepti * include backups. * * @param skCase - Have to pass this in because we don't have access to the - * normal method - * @param fsc - FsContent from the same file system we want the OS - * information from + * normal method + * @param fsc - FsContent from the same file system we want the OS + * information from + * * @return - List of OSInfo objects + * * @throws TskCoreException */ public static List<OSInfo> getOSInfo(SleuthkitCase skCase, FsContent fsc) throws TskCoreException { @@ -64,8 +68,10 @@ public static List<OSInfo> getOSInfo(SleuthkitCase skCase, FsContent fsc) throws * backups * * @param skCase - Have to pass this in because we don't have access to the - * normal method + * normal method + * * @return - List of OSInfo objects + * * @throws TskCoreException */ public static List<OSInfo> getAllOSInfo(SleuthkitCase skCase) throws TskCoreException { @@ -75,15 +81,17 @@ public static List<OSInfo> getAllOSInfo(SleuthkitCase skCase) throws TskCoreExce /** * Internal method to find and combine the requested OS Info data. * - * @param skCase - Have to pass this in because we don't have access to the - * normal method + * @param skCase - Have to pass this in because we don't have access + * to the normal method * @param includeBackups - true if we should include registry data found in - * "RegBack" - * @param restrictFs - true if an file system id is being provided to match - * against - * @param fsId - the file system ID that the registry hives must be on (if - * restrictFs is set) + * "RegBack" + * @param restrictFs - true if an file system id is being provided to + * match against + * @param fsId - the file system ID that the registry hives must + * be on (if restrictFs is set) + * * @return - List of OSInfo objects + * * @throws TskCoreException */ private static List<OSInfo> getOSInfoInternal(SleuthkitCase skCase, boolean includeBackups, diff --git a/bindings/java/src/org/sleuthkit/datamodel/ReadContentInputStream.java b/bindings/java/src/org/sleuthkit/datamodel/ReadContentInputStream.java index b5d5933cc0628c7130536dcc915e17031f790053..9e8481d121ae96868713e78683457fbd0df7066a 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/ReadContentInputStream.java +++ b/bindings/java/src/org/sleuthkit/datamodel/ReadContentInputStream.java @@ -166,8 +166,9 @@ public long getCurPosition() { * Set new current position in the stream, up to and including EOF * * @param newPosition new position in the stream to be set + * * @return the actual position set, which can be less than position passed - * in if EOF has been reached + * in if EOF has been reached */ public long seek(long newPosition) { if (newPosition < 0) { diff --git a/bindings/java/src/org/sleuthkit/datamodel/Report.java b/bindings/java/src/org/sleuthkit/datamodel/Report.java index fbe8c40345d677894179496ed3cb69264070d2b0..e1442b9f9c50c67e7e92afabfe3883fd9cdb5b25 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/Report.java +++ b/bindings/java/src/org/sleuthkit/datamodel/Report.java @@ -33,10 +33,10 @@ public class Report { /** * Construct a data transfer object for a row in the reports table. * - * @param id Primary key from associated row in the case database. - * @param path Absolute path to report. + * @param id Primary key from associated row in the case database. + * @param path Absolute path to report. * @param createdTime Created time of report (in UNIX epoch time). - * @param reportName May be empty + * @param reportName May be empty */ Report(long id, String path, long createdTime, String sourceModuleName, String reportName) { this.id = id; diff --git a/bindings/java/src/org/sleuthkit/datamodel/ResultSetHelper.java b/bindings/java/src/org/sleuthkit/datamodel/ResultSetHelper.java index 6f9f3bd6fc1fa585bd5c5ed4c315819b3faa5502..d608250917401afe059ab192f7fc79ba72ffeac0 100755 --- a/bindings/java/src/org/sleuthkit/datamodel/ResultSetHelper.java +++ b/bindings/java/src/org/sleuthkit/datamodel/ResultSetHelper.java @@ -45,12 +45,14 @@ class ResultSetHelper { * Create an image from the result set containing query results on * tsk_image_info table * - * @param rs result set containing query results + * @param rs result set containing query results * @param imagePaths image file paths + * * @return image object created + * * @throws TskCoreException thrown if critical error occurred within tsk - * core - * @throws SQLException thrown if SQL error occurs + * core + * @throws SQLException thrown if SQL error occurs */ Image image(ResultSet rs, String[] imagePaths) throws TskCoreException, SQLException { @@ -84,7 +86,9 @@ Image image(ResultSet rs, String[] imagePaths) throws TskCoreException, SQLExcep * Get image path string from the result set on tsk_image_names table * * @param rs result set with the tsk_image_names query result + * * @return image path + * * @throws SQLException thrown if SQL error occurred */ String imagePath(ResultSet rs) throws SQLException { @@ -95,9 +99,11 @@ String imagePath(ResultSet rs) throws SQLException { * Create an VolumeSystem object from the result set containing query * results on tsk_vs_info table * - * @param rs resultset containing query results + * @param rs resultset containing query results * @param parent parent image + * * @return volume system object newly created + * * @throws SQLException exception thrown if SQL error occurred */ VolumeSystem volumeSystem(ResultSet rs, Image parent) throws SQLException { @@ -117,9 +123,11 @@ VolumeSystem volumeSystem(ResultSet rs, Image parent) throws SQLException { * Create an Volume object from the result set containing query results on * tsk_vs_parts table * - * @param rs result set containing query results + * @param rs result set containing query results * @param parent parent volume system + * * @return newly created Volume object + * * @throws SQLException thrown if SQL error occurred */ Volume volume(ResultSet rs, VolumeSystem parent) throws SQLException { @@ -147,9 +155,11 @@ Volume volume(ResultSet rs, VolumeSystem parent) throws SQLException { * Create a FileSystem object from the result set containing query results * on tsk_fs_info table * - * @param rs the result set + * @param rs the result set * @param parent parent content object + * * @return newly create FileSystem object + * * @throws SQLException thrown if SQL error occurred */ FileSystem fileSystem(ResultSet rs, Content parent) throws SQLException { @@ -168,7 +178,9 @@ FileSystem fileSystem(ResultSet rs, Content parent) throws SQLException { * * @param rs the result set * @param fs parent file system + * * @return a newly create File + * * @throws SQLException */ File file(ResultSet rs, FileSystem fs) throws SQLException { @@ -194,8 +206,10 @@ File file(ResultSet rs, FileSystem fs) throws SQLException { * * @param rs the result set * @param fs parent file system + * * @name the directory name (TODO why do we need it passed, just query it ) * @return a newly created Directory object + * * @throws SQLException thrown if SQL error occurred */ Directory directory(ResultSet rs, FileSystem fs, String name) throws SQLException { @@ -218,7 +232,9 @@ Directory directory(ResultSet rs, FileSystem fs, String name) throws SQLExceptio * Create a virtual directory object from a result set * * @param rs the result set + * * @return + * * @throws SQLException */ VirtualDirectory virtualDirectory(ResultSet rs) throws SQLException { @@ -247,7 +263,9 @@ VirtualDirectory virtualDirectory(ResultSet rs) throws SQLException { * * @param rs the result set * @param fs the parent file system, + * * @return a newly created Directory object + * * @throws SQLException thrown if SQL error occurred */ Directory directory(ResultSet rs, FileSystem fs) throws SQLException { @@ -259,7 +277,9 @@ Directory directory(ResultSet rs, FileSystem fs) throws SQLException { * tsk_file_layout table * * @param rs the result set containg query results + * * @return newly create tsk file range object + * * @throws SQLException thrown if SQL error occurred */ TskFileRange tskFileRange(ResultSet rs) throws SQLException { @@ -270,9 +290,11 @@ TskFileRange tskFileRange(ResultSet rs) throws SQLException { /** * Creates an derived file given result set and parent id (optional) * - * @param rs exsting active result set + * @param rs exsting active result set * @param parentId parent id or AbstractContent.UNKNOWN_ID + * * @return derived file object created + * * @throws SQLException */ DerivedFile derivedFile(ResultSet rs, long parentId) throws SQLException { @@ -306,9 +328,11 @@ DerivedFile derivedFile(ResultSet rs, long parentId) throws SQLException { * Creates a LocalFile file object from a SELECT * FROM tsk_files table * result set. * - * @param rs The result set. + * @param rs The result set. * @param parentId The parent id of the file or AbstractContent.UNKNOWN_ID. + * * @return The LocalFile object. + * * @throws SQLException if there is an error querying the case database. */ LocalFile localFile(ResultSet rs, long parentId) throws SQLException { @@ -343,7 +367,9 @@ LocalFile localFile(ResultSet rs, long parentId) throws SQLException { * * @param rs * @param parentId + * * @return + * * @throws SQLException */ List<Content> fileChildren(ResultSet rs, long parentId) throws SQLException { diff --git a/bindings/java/src/org/sleuthkit/datamodel/SleuthkitCase.java b/bindings/java/src/org/sleuthkit/datamodel/SleuthkitCase.java index 60f45fc1f257949b877deded64a1c3806896685b..3920fdfbc28f8c4c28b5509fa2c9ceb66d6f77be 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/SleuthkitCase.java +++ b/bindings/java/src/org/sleuthkit/datamodel/SleuthkitCase.java @@ -185,10 +185,11 @@ public static void tryConnect(CaseDbConnectionInfo info) throws TskCoreException * Private constructor, clients must use newCase() or openCase() method to * create an instance of this class. * - * @param dbPath The full path to a SQLite case database file. + * @param dbPath The full path to a SQLite case database file. * @param caseHandle A handle to a case database object in the native code - * SleuthKit layer. - * @param dbType The type of database we're dealing with + * SleuthKit layer. + * @param dbType The type of database we're dealing with + * * @throws Exception */ private SleuthkitCase(String dbPath, SleuthkitJNI.CaseDbHandle caseHandle, DbType dbType) throws Exception { @@ -206,14 +207,17 @@ private SleuthkitCase(String dbPath, SleuthkitJNI.CaseDbHandle caseHandle, DbTyp * Private constructor, clients must use newCase() or openCase() method to * create an instance of this class. * - * @param host The PostgreSQL database server. - * @param port The port to use connect to the PostgreSQL database server. - * @param dbName The name of the case database. - * @param userName The user name to use to connect to the case database. - * @param password The password to use to connect to the case database. - * @param caseHandle A handle to a case database object in the native code - * @param dbType The type of database we're dealing with SleuthKit layer. + * @param host The PostgreSQL database server. + * @param port The port to use connect to the PostgreSQL database + * server. + * @param dbName The name of the case database. + * @param userName The user name to use to connect to the case database. + * @param password The password to use to connect to the case database. + * @param caseHandle A handle to a case database object in the native code + * @param dbType The type of database we're dealing with SleuthKit + * layer. * @param caseDirPath The path to the root case directory. + * * @throws Exception */ private SleuthkitCase(String host, int port, String dbName, String userName, String password, SleuthkitJNI.CaseDbHandle caseHandle, String caseDirPath, DbType dbType) throws Exception { @@ -397,7 +401,8 @@ private void updateDatabaseSchema(String dbPath) throws Exception { * copy only, and continues to use the current connection. * * @param newDBPath Path to the copy to be created. File will be overwritten - * if it exists. + * if it exists. + * * @throws IOException if copying fails. */ public void copyCaseDB(String newDBPath) throws IOException { @@ -449,13 +454,15 @@ private void logSQLiteJDBCDriverInfo() { * Updates a schema version 2 database to a schema version 3 database. * * @param schemaVersionNumber The current schema version number of the - * database. - * @param connection A connection to the case database. + * database. + * @param connection A connection to the case database. + * * @return The new database schema version. - * @throws SQLException If there is an error completing a database - * operation. + * + * @throws SQLException If there is an error completing a database + * operation. * @throws TskCoreException If there is an error completing a database - * operation via another SleuthkitCase method. + * operation via another SleuthkitCase method. */ @SuppressWarnings("deprecation") private int updateFromSchema2toSchema3(int schemaVersionNumber, CaseDbConnection connection) throws SQLException, TskCoreException { @@ -588,13 +595,15 @@ private int updateFromSchema2toSchema3(int schemaVersionNumber, CaseDbConnection * Updates a schema version 3 database to a schema version 4 database. * * @param schemaVersionNumber The current schema version number of the - * database. - * @param connection A connection to the case database. + * database. + * @param connection A connection to the case database. + * * @return The new database schema version. - * @throws SQLException If there is an error completing a database - * operation. + * + * @throws SQLException If there is an error completing a database + * operation. * @throws TskCoreException If there is an error completing a database - * operation via another SleuthkitCase method. + * operation via another SleuthkitCase method. */ private int updateFromSchema3toSchema4(int schemaVersionNumber, CaseDbConnection connection) throws SQLException, TskCoreException { if (schemaVersionNumber != 3) { @@ -715,6 +724,7 @@ public String getBackupDatabasePath() { * the transaction object. * * @return A CaseDbTransaction object. + * * @throws TskCoreException */ public CaseDbTransaction beginTransaction() throws TskCoreException { @@ -779,7 +789,9 @@ public void releaseSharedLock() { * Open an existing case database. * * @param dbPath Path to SQLite case database. + * * @return Case database object. + * * @throws org.sleuthkit.datamodel.TskCoreException */ public static SleuthkitCase openCase(String dbPath) throws TskCoreException { @@ -795,24 +807,26 @@ public static SleuthkitCase openCase(String dbPath) throws TskCoreException { * Open an existing multi-user case database. * * @param databaseName The name of the database. - * @param info Connection information for the the database. - * @param caseDir The folder where the case metadata fils is stored. + * @param info Connection information for the the database. + * @param caseDir The folder where the case metadata fils is stored. + * * @return A case database object. + * * @throws TskCoreException If there is a problem opening the database. */ public static SleuthkitCase openCase(String databaseName, CaseDbConnectionInfo info, String caseDir) throws TskCoreException { try { /* - * The flow of this method involves - * trying to open case and if successful, return that case. If unsuccessful, - * an exception is thrown. We catch any exceptions, and use tryConnect() to - * attempt to obtain further information about the error. If tryConnect() is + * The flow of this method involves trying to open case and if + * successful, return that case. If unsuccessful, an exception is + * thrown. We catch any exceptions, and use tryConnect() to attempt + * to obtain further information about the error. If tryConnect() is * unable to successfully connect, tryConnect() will throw a - * TskCoreException with a message containing user-level error reporting. If - * tryConnect() is able to connect, flow continues and we rethrow the - * original exception obtained from trying to create the case. In this way, - * we obtain more detailed information if we are able, but do not lose any - * information if unable. + * TskCoreException with a message containing user-level error + * reporting. If tryConnect() is able to connect, flow continues and + * we rethrow the original exception obtained from trying to create + * the case. In this way, we obtain more detailed information if we + * are able, but do not lose any information if unable. */ final SleuthkitJNI.CaseDbHandle caseHandle = SleuthkitJNI.openCaseDb(databaseName, info); return new SleuthkitCase(info.getHost(), Integer.parseInt(info.getPort()), databaseName, info.getUserName(), info.getPassword(), caseHandle, caseDir, info.getDbType()); @@ -829,7 +843,9 @@ public static SleuthkitCase openCase(String databaseName, CaseDbConnectionInfo i * Create a new case database. * * @param dbPath Path to where SQlite case database should be created. + * * @return Case database object. + * * @throws org.sleuthkit.datamodel.TskCoreException */ public static SleuthkitCase newCase(String dbPath) throws TskCoreException { @@ -844,10 +860,12 @@ public static SleuthkitCase newCase(String dbPath) throws TskCoreException { /** * Create a new multi-user case database. * - * @param info the information to connect to the database + * @param info the information to connect to the database * @param databaseName the name of the database - * @param caseDirPath the path of the case + * @param caseDirPath the path of the case + * * @return Case database object. + * * @throws org.sleuthkit.datamodel.TskCoreException */ public static SleuthkitCase newCase(String databaseName, CaseDbConnectionInfo info, String caseDirPath) throws TskCoreException { @@ -880,13 +898,14 @@ public static SleuthkitCase newCase(String databaseName, CaseDbConnectionInfo in * Start process of adding a image to the case. Adding an image is a * multi-step process and this returns an object that allows it to happen. * - * @param timezone TZ time zone string to use for ingest of image. + * @param timezone TZ time zone string to use for ingest of image. * @param addUnallocSpace Set to true to create virtual files for - * unallocated space in the image. - * @param noFatFsOrphans Set to true to skip processing orphan files of FAT - * file systems. + * unallocated space in the image. + * @param noFatFsOrphans Set to true to skip processing orphan files of FAT + * file systems. + * * @return Object that encapsulates control of adding an image via the - * SleuthKit native code layer. + * SleuthKit native code layer. */ public AddImageProcess makeAddImageProcess(String timezone, boolean addUnallocSpace, boolean noFatFsOrphans) { return this.caseHandle.initAddImageProcess(timezone, addUnallocSpace, noFatFsOrphans); @@ -897,6 +916,7 @@ public AddImageProcess makeAddImageProcess(String timezone, boolean addUnallocSp * image files, logical (local) files, virtual directories. * * @return List of content objects representing root objects. + * * @throws TskCoreException */ public List<Content> getRootObjects() throws TskCoreException { @@ -952,6 +972,7 @@ public List<Content> getRootObjects() throws TskCoreException { * method. * * @return A list of the data sources for the case. + * * @throws TskCoreException if there is a problem getting the data sources. */ public List<DataSource> getDataSources() throws TskCoreException { @@ -988,9 +1009,11 @@ public List<DataSource> getDataSources() throws TskCoreException { * future, this method will be a replacement for the getRootObjects method. * * @param objectId The object id of the data source. + * * @return The data source. + * * @throws TskDataException if there is no data source for the given object - * id. + * id. * @throws TskCoreException if there is a problem getting the data source. */ public DataSource getDataSource(long objectId) throws TskDataException, TskCoreException { @@ -1020,7 +1043,9 @@ public DataSource getDataSource(long objectId) throws TskDataException, TskCoreE * Get all blackboard artifacts of a given type. * * @param artifactTypeID artifact type id (must exist in database) + * * @return list of blackboard artifacts. + * * @throws TskCoreException */ public ArrayList<BlackboardArtifact> getBlackboardArtifacts(int artifactTypeID) throws TskCoreException { @@ -1054,7 +1079,9 @@ public ArrayList<BlackboardArtifact> getBlackboardArtifacts(int artifactTypeID) * Get a count of blackboard artifacts for a given content. * * @param objId Id of the content. + * * @return The artifacts count for the content. + * * @throws TskCoreException */ public long getBlackboardArtifactsCount(long objId) throws TskCoreException { @@ -1084,7 +1111,9 @@ public long getBlackboardArtifactsCount(long objId) throws TskCoreException { * Get a count of artifacts of a given type. * * @param artifactTypeID Id of the artifact type. + * * @return The artifacts count for the type. + * * @throws TskCoreException */ public long getBlackboardArtifactsTypeCount(int artifactTypeID) throws TskCoreException { @@ -1115,11 +1144,14 @@ public long getBlackboardArtifactsTypeCount(int artifactTypeID) throws TskCoreEx * String value * * @param attrType attribute of this attribute type to look for in the - * artifacts - * @param value value of the attribute of the attrType type to look for + * artifacts + * @param value value of the attribute of the attrType type to look for + * * @return a list of blackboard artifacts with such an attribute + * * @throws TskCoreException exception thrown if a critical error occurred - * within tsk core and artifacts could not be queried + * within tsk core and artifacts could not be + * queried */ public List<BlackboardArtifact> getBlackboardArtifacts(BlackboardAttribute.ATTRIBUTE_TYPE attrType, String value) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -1156,15 +1188,18 @@ public List<BlackboardArtifact> getBlackboardArtifacts(BlackboardAttribute.ATTRI * Get all blackboard artifacts that have an attribute of the given type and * String value * - * @param attrType attribute of this attribute type to look for in the - * artifacts - * @param subString value substring of the string attribute of the attrType - * type to look for + * @param attrType attribute of this attribute type to look for in the + * artifacts + * @param subString value substring of the string attribute of the attrType + * type to look for * @param startsWith if true, the artifact attribute string should start - * with the substring, if false, it should just contain it + * with the substring, if false, it should just contain it + * * @return a list of blackboard artifacts with such an attribute + * * @throws TskCoreException exception thrown if a critical error occurred - * within tsk core and artifacts could not be queried + * within tsk core and artifacts could not be + * queried */ public List<BlackboardArtifact> getBlackboardArtifacts(BlackboardAttribute.ATTRIBUTE_TYPE attrType, String subString, boolean startsWith) throws TskCoreException { subString = "%" + subString; //NON-NLS @@ -1206,11 +1241,14 @@ public List<BlackboardArtifact> getBlackboardArtifacts(BlackboardAttribute.ATTRI * integer value * * @param attrType attribute of this attribute type to look for in the - * artifacts - * @param value value of the attribute of the attrType type to look for + * artifacts + * @param value value of the attribute of the attrType type to look for + * * @return a list of blackboard artifacts with such an attribute + * * @throws TskCoreException exception thrown if a critical error occurred - * within tsk core and artifacts could not be queried + * within tsk core and artifacts could not be + * queried */ public List<BlackboardArtifact> getBlackboardArtifacts(BlackboardAttribute.ATTRIBUTE_TYPE attrType, int value) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -1248,11 +1286,14 @@ public List<BlackboardArtifact> getBlackboardArtifacts(BlackboardAttribute.ATTRI * long value * * @param attrType attribute of this attribute type to look for in the - * artifacts - * @param value value of the attribute of the attrType type to look for + * artifacts + * @param value value of the attribute of the attrType type to look for + * * @return a list of blackboard artifacts with such an attribute + * * @throws TskCoreException exception thrown if a critical error occurred - * within tsk core and artifacts could not be queried + * within tsk core and artifacts could not be + * queried */ public List<BlackboardArtifact> getBlackboardArtifacts(BlackboardAttribute.ATTRIBUTE_TYPE attrType, long value) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -1290,11 +1331,14 @@ public List<BlackboardArtifact> getBlackboardArtifacts(BlackboardAttribute.ATTRI * double value * * @param attrType attribute of this attribute type to look for in the - * artifacts - * @param value value of the attribute of the attrType type to look for + * artifacts + * @param value value of the attribute of the attrType type to look for + * * @return a list of blackboard artifacts with such an attribute + * * @throws TskCoreException exception thrown if a critical error occurred - * within tsk core and artifacts could not be queried + * within tsk core and artifacts could not be + * queried */ public List<BlackboardArtifact> getBlackboardArtifacts(BlackboardAttribute.ATTRIBUTE_TYPE attrType, double value) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -1332,11 +1376,14 @@ public List<BlackboardArtifact> getBlackboardArtifacts(BlackboardAttribute.ATTRI * byte value * * @param attrType attribute of this attribute type to look for in the - * artifacts - * @param value value of the attribute of the attrType type to look for + * artifacts + * @param value value of the attribute of the attrType type to look for + * * @return a list of blackboard artifacts with such an attribute + * * @throws TskCoreException exception thrown if a critical error occurred - * within tsk core and artifacts could not be queried + * within tsk core and artifacts could not be + * queried */ public List<BlackboardArtifact> getBlackboardArtifacts(BlackboardAttribute.ATTRIBUTE_TYPE attrType, byte value) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -1404,6 +1451,7 @@ public Iterable<BlackboardArtifact.Type> getArtifactTypes() throws TskCoreExcept * blackboard. * * @return List of standard blackboard artifact types + * * @throws TskCoreException */ public ArrayList<BlackboardArtifact.ARTIFACT_TYPE> getBlackboardArtifactTypesInUse() throws TskCoreException { @@ -1444,8 +1492,9 @@ public ArrayList<BlackboardArtifact.ARTIFACT_TYPE> getBlackboardArtifactTypesInU * Gets both static and dynamic IDs. * * @return The list of unique IDs + * * @throws TskCoreException exception thrown if a critical error occurred - * within tsk core + * within tsk core */ public List<BlackboardArtifact.Type> getArtifactTypesInUse() throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -1478,6 +1527,7 @@ public List<BlackboardArtifact.Type> getArtifactTypesInUse() throws TskCoreExcep * Gets a list of all the attribute types for this case * * @return a list of attribute types + * * @throws TskCoreException when there is an error getting the types */ public List<BlackboardAttribute.Type> getAttributeTypes() throws TskCoreException { @@ -1511,8 +1561,9 @@ public List<BlackboardAttribute.Type> getAttributeTypes() throws TskCoreExceptio * modules at runtime) * * @return count of attribute types + * * @throws TskCoreException exception thrown if a critical error occurs - * within TSK core + * within TSK core */ public int getBlackboardAttributeTypesCount() throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -1543,9 +1594,11 @@ public int getBlackboardAttributeTypesCount() throws TskCoreException { * blackboard_artifact_types tables to get all of the required data. * * @param whereClause The WHERE clause to append to the SELECT statement. + * * @return A list of BlackboardArtifact objects. + * * @throws TskCoreException If there is a problem querying the case - * database. + * database. */ private ArrayList<BlackboardArtifact> getArtifactsHelper(String whereClause) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -1577,10 +1630,12 @@ private ArrayList<BlackboardArtifact> getArtifactsHelper(String whereClause) thr * object id * * @param artifactTypeID artifact type id - * @param obj_id associated object id + * @param obj_id associated object id + * * @return count of matching blackboard artifacts + * * @throws TskCoreException exception thrown if a critical error occurs - * within TSK core + * within TSK core */ private long getArtifactsCountHelper(int artifactTypeID, long obj_id) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -1610,10 +1665,12 @@ private long getArtifactsCountHelper(int artifactTypeID, long obj_id) throws Tsk * Get all blackboard artifacts of a given type for the given object id * * @param artifactTypeName artifact type name - * @param obj_id object id + * @param obj_id object id + * * @return list of blackboard artifacts + * * @throws TskCoreException exception thrown if a critical error occurs - * within TSK core + * within TSK core */ public ArrayList<BlackboardArtifact> getBlackboardArtifacts(String artifactTypeName, long obj_id) throws TskCoreException { return getArtifactsHelper("blackboard_artifacts.obj_id = " + obj_id + " AND blackboard_artifact_types.type_name = '" + artifactTypeName + "';"); @@ -1623,10 +1680,12 @@ public ArrayList<BlackboardArtifact> getBlackboardArtifacts(String artifactTypeN * Get all blackboard artifacts of a given type for the given object id * * @param artifactTypeID artifact type id (must exist in database) - * @param obj_id object id + * @param obj_id object id + * * @return list of blackboard artifacts + * * @throws TskCoreException exception thrown if a critical error occurs - * within TSK core + * within TSK core */ public ArrayList<BlackboardArtifact> getBlackboardArtifacts(int artifactTypeID, long obj_id) throws TskCoreException { return getArtifactsHelper("blackboard_artifacts.obj_id = " + obj_id + " AND blackboard_artifact_types.artifact_type_id = " + artifactTypeID + ";"); @@ -1636,10 +1695,12 @@ public ArrayList<BlackboardArtifact> getBlackboardArtifacts(int artifactTypeID, * Get all blackboard artifacts of a given type for the given object id * * @param artifactType artifact type enum - * @param obj_id object id + * @param obj_id object id + * * @return list of blackboard artifacts + * * @throws TskCoreException exception thrown if a critical error occurs - * within TSK core + * within TSK core */ public ArrayList<BlackboardArtifact> getBlackboardArtifacts(ARTIFACT_TYPE artifactType, long obj_id) throws TskCoreException { return getArtifactsHelper("blackboard_artifacts.obj_id = " + obj_id + " AND blackboard_artifact_types.artifact_type_id = " + artifactType.getTypeID() + ";"); @@ -1650,10 +1711,12 @@ public ArrayList<BlackboardArtifact> getBlackboardArtifacts(ARTIFACT_TYPE artifa * object id * * @param artifactTypeName artifact type name - * @param obj_id object id + * @param obj_id object id + * * @return count of blackboard artifacts + * * @throws TskCoreException exception thrown if a critical error occurs - * within TSK core + * within TSK core */ public long getBlackboardArtifactsCount(String artifactTypeName, long obj_id) throws TskCoreException { int artifactTypeID = this.getArtifactType(artifactTypeName).getTypeID(); @@ -1668,10 +1731,12 @@ public long getBlackboardArtifactsCount(String artifactTypeName, long obj_id) th * object id * * @param artifactTypeID artifact type id (must exist in database) - * @param obj_id object id + * @param obj_id object id + * * @return count of blackboard artifacts + * * @throws TskCoreException exception thrown if a critical error occurs - * within TSK core + * within TSK core */ public long getBlackboardArtifactsCount(int artifactTypeID, long obj_id) throws TskCoreException { return getArtifactsCountHelper(artifactTypeID, obj_id); @@ -1682,10 +1747,12 @@ public long getBlackboardArtifactsCount(int artifactTypeID, long obj_id) throws * object id * * @param artifactType artifact type enum - * @param obj_id object id + * @param obj_id object id + * * @return count of blackboard artifacts + * * @throws TskCoreException exception thrown if a critical error occurs - * within TSK core + * within TSK core */ public long getBlackboardArtifactsCount(ARTIFACT_TYPE artifactType, long obj_id) throws TskCoreException { return getArtifactsCountHelper(artifactType.getTypeID(), obj_id); @@ -1695,9 +1762,11 @@ public long getBlackboardArtifactsCount(ARTIFACT_TYPE artifactType, long obj_id) * Get all blackboard artifacts of a given type * * @param artifactTypeName artifact type name + * * @return list of blackboard artifacts + * * @throws TskCoreException exception thrown if a critical error occurs - * within TSK core + * within TSK core */ public ArrayList<BlackboardArtifact> getBlackboardArtifacts(String artifactTypeName) throws TskCoreException { return getArtifactsHelper("blackboard_artifact_types.type_name = '" + artifactTypeName + "';"); @@ -1707,9 +1776,11 @@ public ArrayList<BlackboardArtifact> getBlackboardArtifacts(String artifactTypeN * Get all blackboard artifacts of a given type * * @param artifactType artifact type enum + * * @return list of blackboard artifacts + * * @throws TskCoreException exception thrown if a critical error occurs - * within TSK core + * within TSK core */ public ArrayList<BlackboardArtifact> getBlackboardArtifacts(ARTIFACT_TYPE artifactType) throws TskCoreException { return getArtifactsHelper("blackboard_artifact_types.artifact_type_id = " + artifactType.getTypeID() + ";"); @@ -1720,11 +1791,13 @@ public ArrayList<BlackboardArtifact> getBlackboardArtifacts(ARTIFACT_TYPE artifa * type and String value. * * @param artifactType artifact type enum - * @param attrType attribute type enum - * @param value String value of attribute + * @param attrType attribute type enum + * @param value String value of attribute + * * @return list of blackboard artifacts + * * @throws TskCoreException exception thrown if a critical error occurs - * within TSK core + * within TSK core */ public List<BlackboardArtifact> getBlackboardArtifacts(ARTIFACT_TYPE artifactType, BlackboardAttribute.ATTRIBUTE_TYPE attrType, String value) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -1762,9 +1835,11 @@ public List<BlackboardArtifact> getBlackboardArtifacts(ARTIFACT_TYPE artifactTyp * Get the blackboard artifact with the given artifact id * * @param artifactID artifact ID + * * @return blackboard artifact + * * @throws TskCoreException exception thrown if a critical error occurs - * within TSK core + * within TSK core */ public BlackboardArtifact getBlackboardArtifact(long artifactID) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -1783,9 +1858,11 @@ public BlackboardArtifact getBlackboardArtifact(long artifactID) throws TskCoreE return new BlackboardArtifact(this, rs.getLong("artifact_id"), rs.getLong("obj_id"), rs.getInt("artifact_type_id"), rs.getString("type_name"), rs.getString("display_name")); } else { - /* I think this should actually return null (or Optional) when there - * is no artifact with the given id, but it looks like existing code is - * not expecting that. -jm */ + /* + * I think this should actually return null (or Optional) when + * there is no artifact with the given id, but it looks like + * existing code is not expecting that. -jm + */ throw new TskCoreException("No blackboard artifact with id " + artifactID); } } catch (SQLException ex) { @@ -1800,8 +1877,9 @@ public BlackboardArtifact getBlackboardArtifact(long artifactID) throws TskCoreE /** * Add a blackboard attribute. * - * @param attr A blackboard attribute. + * @param attr A blackboard attribute. * @param artifactTypeId The type of artifact associated with the attribute. + * * @throws TskCoreException thrown if a critical error occurs. */ public void addBlackboardAttribute(BlackboardAttribute attr, int artifactTypeId) throws TskCoreException { @@ -1820,9 +1898,10 @@ public void addBlackboardAttribute(BlackboardAttribute attr, int artifactTypeId) /** * Add a set blackboard attributes. * - * @param attributes A set of blackboard attribute. + * @param attributes A set of blackboard attribute. * @param artifactTypeId The type of artifact associated with the - * attributes. + * attributes. + * * @throws TskCoreException thrown if a critical error occurs. */ public void addBlackboardAttributes(Collection<BlackboardAttribute> attributes, int artifactTypeId) throws TskCoreException { @@ -1892,11 +1971,13 @@ private void addBlackBoardAttribute(BlackboardAttribute attr, int artifactTypeId * Add an attribute type with the given name * * @param attrTypeString Name of the new attribute - * @param valueType The value type of this new attribute type - * @param displayName The (non-unique) display name of the attribute type + * @param valueType The value type of this new attribute type + * @param displayName The (non-unique) display name of the attribute type + * * @return the id of the new attribute + * * @throws TskCoreException exception thrown if a critical error occurs - * within tsk core + * within tsk core */ public BlackboardAttribute.Type addArtifactAttributeType(String attrTypeString, TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE valueType, String displayName) throws TskCoreException, TskDataException { CaseDbConnection connection = connections.getConnection(); @@ -1944,7 +2025,9 @@ public BlackboardAttribute.Type addArtifactAttributeType(String attrTypeString, * Get the attribute type associated with an attribute type name. * * @param attrTypeName An attribute type name. + * * @return An attribute type or null if the attribute type does not exist. + * * @throws TskCoreException If an error occurs accessing the case database. * */ @@ -1980,7 +2063,9 @@ public BlackboardAttribute.Type getAttributeType(String attrTypeName) throws Tsk * Get the attribute type associated with an attribute type ID. * * @param typeID An attribute type ID. + * * @return An attribute type or null if the attribute type does not exist. + * * @throws TskCoreException If an error occurs accessing the case database. * */ @@ -2016,7 +2101,9 @@ private BlackboardAttribute.Type getAttributeType(int typeID) throws TskCoreExce * Get the artifact type associated with an artifact type name. * * @param artTypeName An artifact type name. + * * @return An artifact type or null if the artifact type does not exist. + * * @throws TskCoreException If an error occurs accessing the case database. * */ @@ -2052,7 +2139,9 @@ public BlackboardArtifact.Type getArtifactType(String artTypeName) throws TskCor * Get the artifact type associated with an artifact type name. * * @param artTypeId An artifact type id. + * * @return An artifact type or null if the artifact type does not exist. + * * @throws TskCoreException If an error occurs accessing the case database. * */ @@ -2088,11 +2177,13 @@ BlackboardArtifact.Type getArtifactType(int artTypeId) throws TskCoreException { * Add an artifact type with the given name. Will return an artifact Type. * * @param artifactTypeName System (unique) name of artifact - * @param displayName Display (non-unique) name of artifact + * @param displayName Display (non-unique) name of artifact + * * @return Type of the artifact added + * * @throws TskCoreException exception thrown if a critical error occurs * @throws TskDataException exception thrown if given data is already in db - * within tsk core + * within tsk core */ public BlackboardArtifact.Type addBlackboardArtifactType(String artifactTypeName, String displayName) throws TskCoreException, TskDataException { CaseDbConnection connection = connections.getConnection(); @@ -2177,9 +2268,11 @@ public ArrayList<BlackboardAttribute> getBlackboardAttributes(final BlackboardAr * tables * * @param whereClause a sqlite where clause + * * @return a list of matching attributes + * * @throws TskCoreException exception thrown if a critical error occurs - * within tsk core \ref query_database_page + * within tsk core \ref query_database_page */ public ArrayList<BlackboardAttribute> getMatchingAttributes(String whereClause) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -2226,9 +2319,11 @@ public ArrayList<BlackboardAttribute> getMatchingAttributes(String whereClause) * "WHERE" or "JOIN". To use this method you must know the database tables * * @param whereClause a sqlite where clause + * * @return a list of matching artifacts + * * @throws TskCoreException exception thrown if a critical error occurs - * within tsk core \ref query_database_page + * within tsk core \ref query_database_page */ public ArrayList<BlackboardArtifact> getMatchingArtifacts(String whereClause) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -2264,10 +2359,12 @@ public ArrayList<BlackboardArtifact> getMatchingArtifacts(String whereClause) th * looked up in the returned blackboard artifact. * * @param artifactTypeID the type the given artifact should have - * @param obj_id the content object id associated with this artifact + * @param obj_id the content object id associated with this artifact + * * @return a new blackboard artifact + * * @throws TskCoreException exception thrown if a critical error occurs - * within tsk core + * within tsk core */ public BlackboardArtifact newBlackboardArtifact(int artifactTypeID, long obj_id) throws TskCoreException { BlackboardArtifact.Type type = getArtifactType(artifactTypeID); @@ -2278,10 +2375,12 @@ public BlackboardArtifact newBlackboardArtifact(int artifactTypeID, long obj_id) * Add a new blackboard artifact with the given type. * * @param artifactType the type the given artifact should have - * @param obj_id the content object id associated with this artifact + * @param obj_id the content object id associated with this artifact + * * @return a new blackboard artifact + * * @throws TskCoreException exception thrown if a critical error occurs - * within tsk core + * within tsk core */ public BlackboardArtifact newBlackboardArtifact(ARTIFACT_TYPE artifactType, long obj_id) throws TskCoreException { return newBlackboardArtifact(artifactType.getTypeID(), obj_id, artifactType.getLabel(), artifactType.getDisplayName()); @@ -2324,9 +2423,11 @@ private BlackboardArtifact newBlackboardArtifact(int artifact_type_id, long obj_ * and facilities lazy loading. * * @param content content object to check for children + * * @return true if has children, false otherwise + * * @throws TskCoreException exception thrown if a critical error occurs - * within tsk core + * within tsk core */ boolean getContentHasChildren(Content content) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -2357,9 +2458,11 @@ boolean getContentHasChildren(Content content) throws TskCoreException { * loading. * * @param content content object to check for children count + * * @return children count + * * @throws TskCoreException exception thrown if a critical error occurs - * within tsk core + * within tsk core */ int getContentChildrenCount(Content content) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -2389,9 +2492,11 @@ int getContentChildrenCount(Content content) throws TskCoreException { * AbstractFileParent * * @param parent the content parent to get abstract file children for - * @param type children type to look for, defined in TSK_DB_FILES_TYPE_ENUM + * @param type children type to look for, defined in + * TSK_DB_FILES_TYPE_ENUM + * * @throws TskCoreException exception thrown if a critical error occurs - * within tsk core + * within tsk core */ List<Content> getAbstractFileChildren(Content parent, TSK_DB_FILES_TYPE_ENUM type) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -2419,9 +2524,11 @@ List<Content> getAbstractFileChildren(Content parent, TSK_DB_FILES_TYPE_ENUM typ * AbstractFileParent * * @param parent the content parent to get abstract file children for - * @param type children type to look for, defined in TSK_DB_FILES_TYPE_ENUM + * @param type children type to look for, defined in + * TSK_DB_FILES_TYPE_ENUM + * * @throws TskCoreException exception thrown if a critical error occurs - * within tsk core + * within tsk core */ List<Content> getAbstractFileChildren(Content parent) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -2448,8 +2555,10 @@ List<Content> getAbstractFileChildren(Content parent) throws TskCoreException { * given content. * * @param parent Object to find children for - * @param type Type of children to find IDs for + * @param type Type of children to find IDs for + * * @return + * * @throws TskCoreException */ List<Long> getAbstractFileChildrenIds(Content parent, TSK_DB_FILES_TYPE_ENUM type) throws TskCoreException { @@ -2480,7 +2589,9 @@ List<Long> getAbstractFileChildrenIds(Content parent, TSK_DB_FILES_TYPE_ENUM typ * Get list of IDs for abstract files that are children of a given content. * * @param parent Object to find children for + * * @return + * * @throws TskCoreException */ List<Long> getAbstractFileChildrenIds(Content parent) throws TskCoreException { @@ -2510,8 +2621,9 @@ List<Long> getAbstractFileChildrenIds(Content parent) throws TskCoreException { * Get info about children of a given Content from the database. * * @param c Parent object to run query against + * * @throws TskCoreException exception thrown if a critical error occurs - * within tsk core + * within tsk core */ Collection<ObjectInfo> getChildrenInfo(Content c) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -2543,9 +2655,11 @@ Collection<ObjectInfo> getChildrenInfo(Content c) throws TskCoreException { * Get parent info for the parent of the content object * * @param c content object to get parent info for + * * @return the parent object info with the parent object type and id + * * @throws TskCoreException exception thrown if a critical error occurs - * within tsk core + * within tsk core */ ObjectInfo getParentInfo(Content c) throws TskCoreException { // TODO: This should not throw an exception if Content has no parent, @@ -2579,9 +2693,11 @@ ObjectInfo getParentInfo(Content c) throws TskCoreException { * Get parent info for the parent of the content object id * * @param id content object id to get parent info for + * * @return the parent object info with the parent object type and id + * * @throws TskCoreException exception thrown if a critical error occurs - * within tsk core + * within tsk core */ ObjectInfo getParentInfo(long contentId) throws TskCoreException { // TODO: This should not throw an exception if Content has no parent, @@ -2615,9 +2731,11 @@ ObjectInfo getParentInfo(long contentId) throws TskCoreException { * Gets parent directory for FsContent object * * @param fsc FsContent to get parent dir for + * * @return the parent Directory + * * @throws TskCoreException thrown if critical error occurred within tsk - * core + * core */ Directory getParentDirectory(FsContent fsc) throws TskCoreException { // TODO: This should not throw an exception if Content has no parent, @@ -2640,10 +2758,12 @@ Directory getParentDirectory(FsContent fsc) throws TskCoreException { * Get content object by content id * * @param id to get content object for + * * @return instance of a Content object (one of its subclasses), or null if - * not found. + * not found. + * * @throws TskCoreException thrown if critical error occurred within tsk - * core + * core */ public Content getContentById(long id) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -2694,6 +2814,7 @@ public Content getContentById(long id) throws TskCoreException { * Get a path of a file in tsk_files_path table or null if there is none * * @param id id of the file to get path for + * * @return file path or null */ String getFilePath(long id) { @@ -2731,7 +2852,7 @@ String getFilePath(long id) { * Make sure the connection in transaction is used for all database * interactions called by this method * - * @param id id of the file to get path for + * @param id id of the file to get path for * @param transaction the SQL transaction to use * * @return file path or null @@ -2765,7 +2886,7 @@ String getFileParentPath(long id, CaseDbTransaction transaction) { * Make sure the connection in transaction is used for all database * interactions called by this method * - * @param id id of the file to get name for + * @param id id of the file to get name for * @param transaction the SQL transaction to use * * @return file name or null @@ -2796,9 +2917,11 @@ String getFileName(long id, CaseDbTransaction transaction) { * Get a derived method for a file, or null if none * * @param id id of the derived file + * * @return derived method or null if not present + * * @throws TskCoreException exception throws if core error occurred and - * method could not be queried + * method could not be queried */ DerivedFile.DerivedMethod getDerivedMethod(long id) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -2840,9 +2963,11 @@ DerivedFile.DerivedMethod getDerivedMethod(long id) throws TskCoreException { * Get abstract file object from tsk_files table by its id * * @param id id of the file object in tsk_files table + * * @return AbstractFile object populated, or null if not found. + * * @throws TskCoreException thrown if critical error occurred within tsk - * core and file could not be queried + * core and file could not be queried */ public AbstractFile getAbstractFileById(long id) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -2871,10 +2996,11 @@ public AbstractFile getAbstractFileById(long id) throws TskCoreException { /** * Gets the object id of the file system that a file is located in. * - * @param fileId The object id of the file. + * @param fileId The object id of the file. * @param transaction A case database transaction. + * * @return The file system object id or -1, if the file is not in a file - * system. + * system. */ private long getFileSystemId(long fileId, CaseDbTransaction transaction) { return getFileSystemId(fileId, transaction.getConnection()); @@ -2887,8 +3013,9 @@ private long getFileSystemId(long fileId, CaseDbTransaction transaction) { * AbstractFile files, this field is used internally for data source id (the * root content obj) * - * @param fileId object id of the file to get fs column id for + * @param fileId object id of the file to get fs column id for * @param connection the database connection to use + * * @return fs_id or -1 if not present */ private long getFileSystemId(long fileId, CaseDbConnection connection) { @@ -2920,8 +3047,10 @@ private long getFileSystemId(long fileId, CaseDbConnection connection) { * object such as Image or VirtualDirectory representing filesets) * * @param dataSource dataSource to check - * @param fileId id of file to check + * @param fileId id of file to check + * * @return true if the file is in the dataSource hierarchy + * * @throws TskCoreException thrown if check failed */ public boolean isFileFromSource(Content dataSource, long fileId) throws TskCoreException { @@ -2947,11 +3076,13 @@ public boolean isFileFromSource(Content dataSource, long fileId) throws TskCoreE /** * @param dataSource the dataSource (Image, parent-less VirtualDirectory) to - * search for the given file name - * @param fileName Pattern of the name of the file or directory to match - * (case insensitive, used in LIKE SQL statement). + * search for the given file name + * @param fileName Pattern of the name of the file or directory to match + * (case insensitive, used in LIKE SQL statement). + * * @return a list of AbstractFile for files/directories whose name matches - * the given fileName + * the given fileName + * * @throws TskCoreException thrown if check failed */ public List<AbstractFile> findFiles(Content dataSource, String fileName) throws TskCoreException { @@ -2978,13 +3109,15 @@ public List<AbstractFile> findFiles(Content dataSource, String fileName) throws /** * @param dataSource the dataSource (Image, parent-less VirtualDirectory) to - * search for the given file name - * @param fileName Pattern of the name of the file or directory to match - * (case insensitive, used in LIKE SQL statement). - * @param dirName Pattern of the name of a parent directory of fileName - * (case insensitive, used in LIKE SQL statement) + * search for the given file name + * @param fileName Pattern of the name of the file or directory to match + * (case insensitive, used in LIKE SQL statement). + * @param dirName Pattern of the name of a parent directory of fileName + * (case insensitive, used in LIKE SQL statement) + * * @return a list of AbstractFile for files/directories whose name matches - * fileName and whose parent directory contains dirName. + * fileName and whose parent directory contains dirName. + * * @throws org.sleuthkit.datamodel.TskCoreException */ public List<AbstractFile> findFiles(Content dataSource, String fileName, String dirName) throws TskCoreException { @@ -3014,9 +3147,11 @@ public List<AbstractFile> findFiles(Content dataSource, String fileName, String * Adds a virtual directory to the database and returns a VirtualDirectory * object representing it. * - * @param parentId the ID of the parent, or 0 if NULL + * @param parentId the ID of the parent, or 0 if NULL * @param directoryName the name of the virtual directory to create + * * @return + * * @throws TskCoreException */ public VirtualDirectory addVirtualDirectory(long parentId, String directoryName) throws TskCoreException { @@ -3041,12 +3176,14 @@ public VirtualDirectory addVirtualDirectory(long parentId, String directoryName) * Make sure the connection in transaction is used for all database * interactions called by this method * - * @param parentId the ID of the parent, or 0 if NULL + * @param parentId the ID of the parent, or 0 if NULL * @param directoryName the name of the virtual directory to create - * @param transaction the transaction in the scope of which the operation is - * to be performed, managed by the caller + * @param transaction the transaction in the scope of which the operation + * is to be performed, managed by the caller + * * @return a VirtualDirectory object representing the one added to the - * database. + * database. + * * @throws TskCoreException */ public VirtualDirectory addVirtualDirectory(long parentId, String directoryName, CaseDbTransaction transaction) throws TskCoreException { @@ -3160,16 +3297,20 @@ public VirtualDirectory addVirtualDirectory(long parentId, String directoryName, /** * Adds a local/logical files and/or directories data source. * - * @param deviceId An ASCII-printable identifier for the device associated - * with the data source that is intended to be unique across multiple cases - * (e.g., a UUID). + * @param deviceId An ASCII-printable identifier for the device + * associated with the data source that is intended + * to be unique across multiple cases (e.g., a + * UUID). * @param rootDirectoryName The name for the root virtual directory for the - * data source. - * @param timeZone The time zone used to process the data source, may be the - * empty string. - * @param transaction A transaction in the scope of which the operation is - * to be performed, managed by the caller. + * data source. + * @param timeZone The time zone used to process the data source, + * may be the empty string. + * @param transaction A transaction in the scope of which the + * operation is to be performed, managed by the + * caller. + * * @return The new local files data source. + * * @throws TskCoreException if there is an error adding the data source. */ public LocalFilesDataSource addLocalFilesDataSource(String deviceId, String rootDirectoryName, String timeZone, CaseDbTransaction transaction) throws TskCoreException { @@ -3251,6 +3392,7 @@ public LocalFilesDataSource addLocalFilesDataSource(String deviceId, String root * for containers such as for local files. * * @return IDs of virtual directory root objects. + * * @throws org.sleuthkit.datamodel.TskCoreException */ public List<VirtualDirectory> getVirtualDirectoryRoots() throws TskCoreException { @@ -3286,10 +3428,12 @@ public List<VirtualDirectory> getVirtualDirectoryRoots() throws TskCoreException * * @param carvedFileName the name of the carved file to add * @param carvedFileSize the size of the carved file to add - * @param containerId the ID of the parent volume, file system, or image - * @param data the layout information - a list of offsets that make up this - * carved file. + * @param containerId the ID of the parent volume, file system, or image + * @param data the layout information - a list of offsets that + * make up this carved file. + * * @return A LayoutFile object representing the carved file. + * * @throws org.sleuthkit.datamodel.TskCoreException */ public LayoutFile addCarvedFile(String carvedFileName, long carvedFileSize, long containerId, List<TskFileRange> data) throws TskCoreException { @@ -3311,9 +3455,11 @@ public LayoutFile addCarvedFile(String carvedFileName, long carvedFileSize, long * directory if it does not exist already. * * @param filesToAdd a list of CarvedFileContainer files to add as carved - * files + * files + * * @return List<LayoutFile> This is a list of the files added to the - * database + * database + * * @throws org.sleuthkit.datamodel.TskCoreException */ public List<LayoutFile> addCarvedFiles(List<CarvedFileContainer> filesToAdd) throws TskCoreException { @@ -3520,24 +3666,28 @@ public List<LayoutFile> addCarvedFiles(List<CarvedFileContainer> filesToAdd) thr * * TODO add support for adding derived method * - * @param fileName file name the derived file - * @param localPath local path of the derived file, including the file name. - * The path is relative to the database path. - * @param size size of the derived file in bytes + * @param fileName file name the derived file + * @param localPath local path of the derived file, including the file + * name. The path is relative to the database path. + * @param size size of the derived file in bytes * @param ctime * @param crtime * @param atime * @param mtime - * @param isFile whether a file or directory, true if a file - * @param parentFile parent file object (derived or local file) + * @param isFile whether a file or directory, true if a file + * @param parentFile parent file object (derived or local file) * @param rederiveDetails details needed to re-derive file (will be specific - * to the derivation method), currently unused - * @param toolName name of derivation method/tool, currently unused - * @param toolVersion version of derivation method/tool, currently unused - * @param otherDetails details of derivation method/tool, currently unused + * to the derivation method), currently unused + * @param toolName name of derivation method/tool, currently unused + * @param toolVersion version of derivation method/tool, currently + * unused + * @param otherDetails details of derivation method/tool, currently + * unused + * * @return newly created derived file object + * * @throws TskCoreException exception thrown if the object creation failed - * due to a critical system error + * due to a critical system error */ public DerivedFile addDerivedFile(String fileName, String localPath, long size, long ctime, long crtime, long atime, long mtime, @@ -3649,7 +3799,9 @@ public DerivedFile addDerivedFile(String fileName, String localPath, * @param mtime * @param isFile * @param parent + * * @return + * * @throws TskCoreException */ public LocalFile addLocalFile(String fileName, String localPath, @@ -3674,21 +3826,23 @@ public LocalFile addLocalFile(String fileName, String localPath, * are done within a caller-managed transaction; the caller is responsible * for committing or rolling back the transaction. * - * @param fileName The name of the file. - * @param localPath The absolute path (including the file name) of the - * local/logical in secondary storage. - * @param size The size of the file in bytes. - * @param ctime The changed time of the file. - * @param crtime The creation time of the file. - * @param atime The accessed time of the file - * @param mtime The modified time of the file. - * @param isFile True, unless the file is a directory. - * @param parent The parent of the file (e.g., a virtual directory) + * @param fileName The name of the file. + * @param localPath The absolute path (including the file name) of the + * local/logical in secondary storage. + * @param size The size of the file in bytes. + * @param ctime The changed time of the file. + * @param crtime The creation time of the file. + * @param atime The accessed time of the file + * @param mtime The modified time of the file. + * @param isFile True, unless the file is a directory. + * @param parent The parent of the file (e.g., a virtual directory) * @param transaction A caller-managed transaction within which the add file - * operations are performed. + * operations are performed. + * * @return An object representing the local/logical file. + * * @throws TskCoreException if there is an error completing a case database - * operation. + * operation. */ public LocalFile addLocalFile(String fileName, String localPath, long size, long ctime, long crtime, long atime, long mtime, @@ -3775,8 +3929,10 @@ public LocalFile addLocalFile(String fileName, String localPath, * where the input object id is for a source is handled. * * @param connection A case database connection. - * @param objectId An object id. + * @param objectId An object id. + * * @return A data source object id. + * * @throws TskCoreException if there is an erro querying the case database. */ private long getDataSourceObjectId(CaseDbConnection connection, long objectId) throws TskCoreException { @@ -3813,10 +3969,11 @@ private long getDataSourceObjectId(CaseDbConnection connection, long objectId) t * Add a path (such as a local path) for a content object to tsk_file_paths * * @param connection A case database connection. - * @param objId object id of the file to add the path for - * @param path the path to add + * @param objId object id of the file to add the path for + * @param path the path to add + * * @throws SQLException exception thrown when database error occurred and - * path was not added + * path was not added */ private void addFilePath(CaseDbConnection connection, long objId, String path) throws SQLException { PreparedStatement statement = connection.getPreparedStatement(PREPARED_STATEMENT.INSERT_LOCAL_PATH); @@ -3830,12 +3987,15 @@ private void addFilePath(CaseDbConnection connection, long objId, String path) t * Find all files in the data source, by name and parent * * @param dataSource the dataSource (Image, parent-less VirtualDirectory) to - * search for the given file name - * @param fileName Pattern of the name of the file or directory to match - * (case insensitive, used in LIKE SQL statement). + * search for the given file name + * @param fileName Pattern of the name of the file or directory to match + * (case insensitive, used in LIKE SQL statement). * @param parentFile Object for parent file/directory to find children in + * * @return a list of AbstractFile for files/directories whose name matches - * fileName and that were inside a directory described by parentFile. + * fileName and that were inside a directory described by + * parentFile. + * * @throws org.sleuthkit.datamodel.TskCoreException */ public List<AbstractFile> findFiles(Content dataSource, String fileName, AbstractFile parentFile) throws TskCoreException { @@ -3846,8 +4006,11 @@ public List<AbstractFile> findFiles(Content dataSource, String fileName, Abstrac * Count files matching the specific Where clause * * @param sqlWhereClause a SQL where clause appropriate for the desired - * files (do not begin the WHERE clause with the word WHERE!) + * files (do not begin the WHERE clause with the word + * WHERE!) + * * @return count of files each of which satisfy the given WHERE clause + * * @throws TskCoreException \ref query_database_page */ public long countFilesWhere(String sqlWhereClause) throws TskCoreException { @@ -3879,9 +4042,12 @@ public long countFilesWhere(String sqlWhereClause) throws TskCoreException { * queries easier to maintain and understand. * * @param sqlWhereClause a SQL where clause appropriate for the desired - * files (do not begin the WHERE clause with the word WHERE!) + * files (do not begin the WHERE clause with the word + * WHERE!) + * * @return a list of AbstractFile each of which satisfy the given WHERE - * clause + * clause + * * @throws TskCoreException \ref query_database_page */ public List<AbstractFile> findAllFilesWhere(String sqlWhereClause) throws TskCoreException { @@ -3908,8 +4074,11 @@ public List<AbstractFile> findAllFilesWhere(String sqlWhereClause) throws TskCor * Where clause * * @param sqlWhereClause a SQL where clause appropriate for the desired - * files (do not begin the WHERE clause with the word WHERE!) + * files (do not begin the WHERE clause with the word + * WHERE!) + * * @return a list of file ids each of which satisfy the given WHERE clause + * * @throws TskCoreException \ref query_database_page */ public List<Long> findAllFileIdsWhere(String sqlWhereClause) throws TskCoreException { @@ -3937,11 +4106,13 @@ public List<Long> findAllFileIdsWhere(String sqlWhereClause) throws TskCoreExcep /** * @param dataSource the data source (Image, VirtualDirectory for file-sets, - * etc) to search for the given file name - * @param filePath The full path to the file(statement) of interest. This - * can optionally include the image and volume names. Treated in a case- - * insensitive manner. + * etc) to search for the given file name + * @param filePath The full path to the file(statement) of interest. This + * can optionally include the image and volume names. + * Treated in a case- insensitive manner. + * * @return a list of AbstractFile that have the given file path. + * * @throws org.sleuthkit.datamodel.TskCoreException */ public List<AbstractFile> openFiles(Content dataSource, String filePath) throws TskCoreException { @@ -3969,9 +4140,11 @@ public List<AbstractFile> openFiles(Content dataSource, String filePath) throws * Get file layout ranges from tsk_file_layout, for a file with specified id * * @param id of the file to get file layout ranges for + * * @return list of populated file ranges + * * @throws TskCoreException thrown if a critical error occurred within tsk - * core + * core */ public List<TskFileRange> getFileRanges(long id) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -4000,9 +4173,11 @@ public List<TskFileRange> getFileRanges(long id) throws TskCoreException { * Get am image by the image object id * * @param id of the image object + * * @return Image object populated + * * @throws TskCoreException thrown if a critical error occurred within tsk - * core + * core */ public Image getImageById(long id) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -4040,11 +4215,13 @@ public Image getImageById(long id) throws TskCoreException { /** * Get a volume system by the volume system object id * - * @param id id of the volume system + * @param id id of the volume system * @param parent image containing the volume system + * * @return populated VolumeSystem object + * * @throws TskCoreException thrown if a critical error occurred within tsk - * core + * core */ VolumeSystem getVolumeSystemById(long id, Image parent) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -4071,9 +4248,11 @@ VolumeSystem getVolumeSystemById(long id, Image parent) throws TskCoreException } /** - * @param id ID of the desired VolumeSystem + * @param id ID of the desired VolumeSystem * @param parentId ID of the VolumeSystem'statement parent + * * @return the VolumeSystem with the given ID + * * @throws TskCoreException */ VolumeSystem getVolumeSystemById(long id, long parentId) throws TskCoreException { @@ -4085,20 +4264,24 @@ VolumeSystem getVolumeSystemById(long id, long parentId) throws TskCoreException /** * Get a file system by the object id * - * @param id of the filesystem + * @param id of the filesystem * @param parent parent Image of the file system + * * @return populated FileSystem object + * * @throws TskCoreException thrown if a critical error occurred within tsk - * core + * core */ FileSystem getFileSystemById(long id, Image parent) throws TskCoreException { return getFileSystemByIdHelper(id, parent); } /** - * @param id ID of the desired FileSystem + * @param id ID of the desired FileSystem * @param parentId ID of the FileSystem'statement parent + * * @return the desired FileSystem + * * @throws TskCoreException */ FileSystem getFileSystemById(long id, long parentId) throws TskCoreException { @@ -4111,11 +4294,13 @@ FileSystem getFileSystemById(long id, long parentId) throws TskCoreException { /** * Get a file system by the object id * - * @param id of the filesystem + * @param id of the filesystem * @param parent parent Volume of the file system + * * @return populated FileSystem object + * * @throws TskCoreException thrown if a critical error occurred within tsk - * core + * core */ FileSystem getFileSystemById(long id, Volume parent) throws TskCoreException { return getFileSystemByIdHelper(id, parent); @@ -4124,11 +4309,13 @@ FileSystem getFileSystemById(long id, Volume parent) throws TskCoreException { /** * Get file system by id and Content parent * - * @param id of the filesystem to get + * @param id of the filesystem to get * @param parent a direct parent Content object + * * @return populated FileSystem object + * * @throws TskCoreException thrown if a critical error occurred within tsk - * core + * core */ private FileSystem getFileSystemByIdHelper(long id, Content parent) throws TskCoreException { // see if we already have it @@ -4172,9 +4359,11 @@ private FileSystem getFileSystemByIdHelper(long id, Content parent) throws TskCo * * @param id * @param parent volume system + * * @return populated Volume object + * * @throws TskCoreException thrown if a critical error occurred within tsk - * core + * core */ Volume getVolumeById(long id, VolumeSystem parent) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -4201,9 +4390,11 @@ Volume getVolumeById(long id, VolumeSystem parent) throws TskCoreException { } /** - * @param id ID of the desired Volume + * @param id ID of the desired Volume * @param parentId ID of the Volume'statement parent + * * @return the desired Volume + * * @throws TskCoreException */ Volume getVolumeById(long id, long parentId) throws TskCoreException { @@ -4215,11 +4406,13 @@ Volume getVolumeById(long id, long parentId) throws TskCoreException { /** * Get a directory by id * - * @param id of the directory object + * @param id of the directory object * @param parentFs parent file system + * * @return populated Directory object + * * @throws TskCoreException thrown if a critical error occurred within tsk - * core + * core */ Directory getDirectoryById(long id, FileSystem parentFs) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -4258,6 +4451,7 @@ Directory getDirectoryById(long id, FileSystem parentFs) throws TskCoreException * Helper to return FileSystems in an Image * * @param image Image to lookup FileSystem for + * * @return Collection of FileSystems in the image */ public Collection<FileSystem> getFileSystems(Image image) { @@ -4331,9 +4525,11 @@ public Collection<FileSystem> getFileSystems(Image image) { * Returns the list of direct children for a given Image * * @param img image to get children for + * * @return list of Contents (direct image children) + * * @throws TskCoreException thrown if a critical error occurred within tsk - * core + * core */ List<Content> getImageChildren(Image img) throws TskCoreException { Collection<ObjectInfo> childInfos = getChildrenInfo(img); @@ -4359,9 +4555,11 @@ List<Content> getImageChildren(Image img) throws TskCoreException { * Returns the list of direct children IDs for a given Image * * @param img image to get children for + * * @return list of IDs (direct image children) + * * @throws TskCoreException thrown if a critical error occurred within tsk - * core + * core */ List<Long> getImageChildrenIds(Image img) throws TskCoreException { Collection<ObjectInfo> childInfos = getChildrenInfo(img); @@ -4382,9 +4580,11 @@ List<Long> getImageChildrenIds(Image img) throws TskCoreException { * Returns the list of direct children for a given VolumeSystem * * @param vs volume system to get children for + * * @return list of volume system children objects + * * @throws TskCoreException thrown if a critical error occurred within tsk - * core + * core */ List<Content> getVolumeSystemChildren(VolumeSystem vs) throws TskCoreException { Collection<ObjectInfo> childInfos = getChildrenInfo(vs); @@ -4408,9 +4608,11 @@ List<Content> getVolumeSystemChildren(VolumeSystem vs) throws TskCoreException { * Returns the list of direct children IDs for a given VolumeSystem * * @param vs volume system to get children for + * * @return list of volume system children IDs + * * @throws TskCoreException thrown if a critical error occurred within tsk - * core + * core */ List<Long> getVolumeSystemChildrenIds(VolumeSystem vs) throws TskCoreException { Collection<ObjectInfo> childInfos = getChildrenInfo(vs); @@ -4429,9 +4631,11 @@ List<Long> getVolumeSystemChildrenIds(VolumeSystem vs) throws TskCoreException { * Returns a list of direct children for a given Volume * * @param vol volume to get children of + * * @return list of Volume children + * * @throws TskCoreException thrown if a critical error occurred within tsk - * core + * core */ List<Content> getVolumeChildren(Volume vol) throws TskCoreException { Collection<ObjectInfo> childInfos = getChildrenInfo(vol); @@ -4455,9 +4659,11 @@ List<Content> getVolumeChildren(Volume vol) throws TskCoreException { * Returns a list of direct children IDs for a given Volume * * @param vol volume to get children of + * * @return list of Volume children IDs + * * @throws TskCoreException thrown if a critical error occurred within tsk - * core + * core */ List<Long> getVolumeChildrenIds(Volume vol) throws TskCoreException { final Collection<ObjectInfo> childInfos = getChildrenInfo(vol); @@ -4477,8 +4683,9 @@ List<Long> getVolumeChildrenIds(Volume vol) throws TskCoreException { * for that image * * @return map of image object IDs to file paths + * * @throws TskCoreException thrown if a critical error occurred within tsk - * core + * core */ public Map<Long, List<String>> getImagePaths() throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -4518,7 +4725,8 @@ public Map<Long, List<String>> getImagePaths() throws TskCoreException { /** * @return a collection of Images associated with this instance of - * SleuthkitCase + * SleuthkitCase + * * @throws TskCoreException */ public List<Image> getImages() throws TskCoreException { @@ -4552,9 +4760,11 @@ public List<Image> getImages() throws TskCoreException { * Set the file paths for the image given by obj_id * * @param obj_id the ID of the image to update - * @param paths the fully qualified path to the files that make up the image + * @param paths the fully qualified path to the files that make up the + * image + * * @throws TskCoreException exception thrown when critical error occurs - * within tsk core and the update fails + * within tsk core and the update fails */ public void setImagePaths(long obj_id, List<String> paths) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -4584,8 +4794,10 @@ public void setImagePaths(long obj_id, List<String> paths) throws TskCoreExcepti * tsk_files WHERE XYZ". * * @param rs ResultSet to get content from. Caller is responsible for - * closing it. + * closing it. + * * @return list of file objects from tsk_files table containing the files + * * @throws SQLException if the query fails */ private List<AbstractFile> resultSetToAbstractFiles(ResultSet rs) throws SQLException { @@ -4656,7 +4868,9 @@ private List<AbstractFile> resultSetToAbstractFiles(ResultSet rs) throws SQLExce * newly-inserted items. * * @param query The query string to execute. + * * @return A CaseDbQuery instance. + * * @throws TskCoreException */ public CaseDbQuery executeQuery(String query) throws TskCoreException { @@ -4702,11 +4916,13 @@ public void close() { * Store the known status for the FsContent in the database Note: will not * update status if content is already 'Known Bad' * - * @param file The AbstractFile object + * @param file The AbstractFile object * @param fileKnown The object'statement known status + * * @return true if the known status was updated, false otherwise + * * @throws TskCoreException thrown if a critical error occurred within tsk - * core + * core */ public boolean setKnown(AbstractFile file, FileKnown fileKnown) throws TskCoreException { long id = file.getId(); @@ -4737,8 +4953,9 @@ public boolean setKnown(AbstractFile file, FileKnown fileKnown) throws TskCoreEx * Stores the MIME type of a file in the case database and updates the MIME * type of the given file object. * - * @param file A file. + * @param file A file. * @param mimeType The MIME type. + * * @throws TskCoreException If there is an error updating the case database. */ public void setFileMIMEType(AbstractFile file, String mimeType) throws TskCoreException { @@ -4763,10 +4980,11 @@ public void setFileMIMEType(AbstractFile file, String mimeType) throws TskCoreEx /** * Store the md5Hash for the file in the database * - * @param file The file object + * @param file The file object * @param md5Hash The object'statement md5Hash + * * @throws TskCoreException thrown if a critical error occurred within tsk - * core + * core */ void setMd5Hash(AbstractFile file, String md5Hash) throws TskCoreException { if (md5Hash == null) { @@ -4794,9 +5012,11 @@ void setMd5Hash(AbstractFile file, String md5Hash) throws TskCoreException { * Return the number of objects in the database of a given file type. * * @param contentType Type of file to count + * * @return Number of objects with that type. + * * @throws TskCoreException thrown if a critical error occurred within tsk - * core + * core */ public int countFsContentType(TskData.TSK_FS_META_TYPE_ENUM contentType) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -4827,6 +5047,7 @@ public int countFsContentType(TskData.TSK_FS_META_TYPE_ENUM contentType) throws * SQL caseDbConnection * * @param text + * * @return text the escaped version */ public static String escapeSingleQuotes(String text) { @@ -4840,6 +5061,7 @@ public static String escapeSingleQuotes(String text) { * Find all the files with the given MD5 hash. * * @param md5Hash hash value to match files with + * * @return List of AbstractFile with the given hash */ public List<AbstractFile> findFilesByMd5(String md5Hash) { @@ -4972,7 +5194,7 @@ public void removeErrorObserver(ErrorObserver observer) { /** * Submit an error to all clients that are listening. * - * @param context The context in which the error occurred. + * @param context The context in which the error occurred. * @param errorMessage A description of the error that occurred. */ public void submitError(String context, String errorMessage) { @@ -4991,7 +5213,8 @@ public void submitError(String context, String errorMessage) { * Selects all of the rows from the tag_names table in the case database. * * @return A list, possibly empty, of TagName data transfer objects (DTOs) - * for the rows. + * for the rows. + * * @throws TskCoreException */ public List<TagName> getAllTagNames() throws TskCoreException { @@ -5022,7 +5245,8 @@ public List<TagName> getAllTagNames() throws TskCoreException { * blackboard_artifact_tags tables. * * @return A list, possibly empty, of TagName data transfer objects (DTOs) - * for the rows. + * for the rows. + * * @throws TskCoreException */ public List<TagName> getTagNamesInUse() throws TskCoreException { @@ -5052,8 +5276,10 @@ public List<TagName> getTagNamesInUse() throws TskCoreException { * * @param displayName The display name for the new tag name. * @param description The description for the new tag name. - * @param color The HTML color to associate with the new tag name. + * @param color The HTML color to associate with the new tag name. + * * @return A TagName data transfer object (DTO) for the new row. + * * @throws TskCoreException */ public TagName addTagName(String displayName, String description, TagName.HTML_COLOR color) throws TskCoreException { @@ -5083,12 +5309,14 @@ public TagName addTagName(String displayName, String description, TagName.HTML_C /** * Inserts a row into the content_tags table in the case database. * - * @param content The content to tag. - * @param tagName The name to use for the tag. - * @param comment A comment to store with the tag. + * @param content The content to tag. + * @param tagName The name to use for the tag. + * @param comment A comment to store with the tag. * @param beginByteOffset Designates the beginning of a tagged section. - * @param endByteOffset Designates the end of a tagged section. + * @param endByteOffset Designates the end of a tagged section. + * * @return A ContentTag data transfer object (DTO) for the new row. + * * @throws TskCoreException */ public ContentTag addContentTag(Content content, TagName tagName, String comment, long beginByteOffset, long endByteOffset) throws TskCoreException { @@ -5118,9 +5346,9 @@ public ContentTag addContentTag(Content content, TagName tagName, String comment } /* - * Deletes a row from the content_tags table in the case database. - * @param tag A ContentTag data transfer object (DTO) for the row to delete. - * @throws TskCoreException + * Deletes a row from the content_tags table in the case database. @param + * tag A ContentTag data transfer object (DTO) for the row to delete. + * @throws TskCoreException */ public void deleteContentTag(ContentTag tag) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -5143,7 +5371,8 @@ public void deleteContentTag(ContentTag tag) throws TskCoreException { * Selects all of the rows from the content_tags table in the case database. * * @return A list, possibly empty, of ContentTag data transfer objects - * (DTOs) for the rows. + * (DTOs) for the rows. + * * @throws TskCoreException */ public List<ContentTag> getAllContentTags() throws TskCoreException { @@ -5175,7 +5404,9 @@ public List<ContentTag> getAllContentTags() throws TskCoreException { * with a specified foreign key into the tag_names table. * * @param tagName A data transfer object (DTO) for the tag name to match. + * * @return The count, possibly zero. + * * @throws TskCoreException */ public long getContentTagsCountByTagName(TagName tagName) throws TskCoreException { @@ -5210,6 +5441,7 @@ public long getContentTagsCountByTagName(TagName tagName) throws TskCoreExceptio * specified tag id. * * @param contentTagID the tag id of the ContentTag to retrieve. + * * @throws TskCoreException */ public ContentTag getContentTagByID(long contentTagID) throws TskCoreException { @@ -5246,8 +5478,10 @@ public ContentTag getContentTagByID(long contentTagID) throws TskCoreException { * specified foreign key into the tag_names table. * * @param tagName A data transfer object (DTO) for the tag name to match. + * * @return A list, possibly empty, of ContentTag data transfer objects - * (DTOs) for the rows. + * (DTOs) for the rows. + * * @throws TskCoreException */ public List<ContentTag> getContentTagsByTagName(TagName tagName) throws TskCoreException { @@ -5284,8 +5518,10 @@ public List<ContentTag> getContentTagsByTagName(TagName tagName) throws TskCoreE * specified foreign key into the tsk_objects table. * * @param content A data transfer object (DTO) for the content to match. + * * @return A list, possibly empty, of ContentTag data transfer objects - * (DTOs) for the rows. + * (DTOs) for the rows. + * * @throws TskCoreException */ public List<ContentTag> getContentTagsByContent(Content content) throws TskCoreException { @@ -5319,10 +5555,12 @@ public List<ContentTag> getContentTagsByContent(Content content) throws TskCoreE * database. * * @param artifact The blackboard artifact to tag. - * @param tagName The name to use for the tag. - * @param comment A comment to store with the tag. + * @param tagName The name to use for the tag. + * @param comment A comment to store with the tag. + * * @return A BlackboardArtifactTag data transfer object (DTO) for the new - * row. + * row. + * * @throws TskCoreException */ public BlackboardArtifactTag addBlackboardArtifactTag(BlackboardArtifact artifact, TagName tagName, String comment) throws TskCoreException { @@ -5350,9 +5588,9 @@ public BlackboardArtifactTag addBlackboardArtifactTag(BlackboardArtifact artifac } /* - * Deletes a row from the blackboard_artifact_tags table in the case database. - * @param tag A BlackboardArtifactTag data transfer object (DTO) representing the row to delete. - * @throws TskCoreException + * Deletes a row from the blackboard_artifact_tags table in the case + * database. @param tag A BlackboardArtifactTag data transfer object (DTO) + * representing the row to delete. @throws TskCoreException */ public void deleteBlackboardArtifactTag(BlackboardArtifactTag tag) throws TskCoreException { CaseDbConnection connection = connections.getConnection(); @@ -5376,7 +5614,8 @@ public void deleteBlackboardArtifactTag(BlackboardArtifactTag tag) throws TskCor * case database. * * @return A list, possibly empty, of BlackboardArtifactTag data transfer - * objects (DTOs) for the rows. + * objects (DTOs) for the rows. + * * @throws TskCoreException */ public List<BlackboardArtifactTag> getAllBlackboardArtifactTags() throws TskCoreException { @@ -5410,7 +5649,9 @@ public List<BlackboardArtifactTag> getAllBlackboardArtifactTags() throws TskCore * case database with a specified foreign key into the tag_names table. * * @param tagName A data transfer object (DTO) for the tag name to match. + * * @return The count, possibly zero. + * * @throws TskCoreException */ public long getBlackboardArtifactTagsCountByTagName(TagName tagName) throws TskCoreException { @@ -5445,8 +5686,10 @@ public long getBlackboardArtifactTagsCountByTagName(TagName tagName) throws TskC * database with a specified foreign key into the tag_names table. * * @param tagName A data transfer object (DTO) for the tag name to match. + * * @return A list, possibly empty, of BlackboardArtifactTag data transfer - * objects (DTOs) for the rows. + * objects (DTOs) for the rows. + * * @throws TskCoreException */ public List<BlackboardArtifactTag> getBlackboardArtifactTagsByTagName(TagName tagName) throws TskCoreException { @@ -5484,8 +5727,10 @@ public List<BlackboardArtifactTag> getBlackboardArtifactTagsByTagName(TagName ta * database with a specified tag id. * * @param artifactTagID the tag id of the BlackboardArtifactTag to retrieve. + * * @return the BlackBoardArtifact Tag with the given tag id, or null if no - * such tag could be found + * such tag could be found + * * @throws TskCoreException */ public BlackboardArtifactTag getBlackboardArtifactTagByID(long artifactTagID) throws TskCoreException { @@ -5525,8 +5770,10 @@ public BlackboardArtifactTag getBlackboardArtifactTagByID(long artifactTagID) th * table. * * @param artifact A data transfer object (DTO) for the artifact to match. + * * @return A list, possibly empty, of BlackboardArtifactTag data transfer - * objects (DTOs) for the rows. + * objects (DTOs) for the rows. + * * @throws TskCoreException */ public List<BlackboardArtifactTag> getBlackboardArtifactTagsByArtifact(BlackboardArtifact artifact) throws TskCoreException { @@ -5559,11 +5806,14 @@ public List<BlackboardArtifactTag> getBlackboardArtifactTagsByArtifact(Blackboar /** * Inserts a row into the reports table in the case database. * - * @param localPath The path of the report file, must be in the database - * directory (case directory in Autopsy) or one of its subdirectories. + * @param localPath The path of the report file, must be in the + * database directory (case directory in Autopsy) or + * one of its subdirectories. * @param sourceModuleName The name of the module that created the report. - * @param reportName The report name, may be empty. + * @param reportName The report name, may be empty. + * * @return A Report data transfer object (DTO) for the new row. + * * @throws TskCoreException */ public Report addReport(String localPath, String sourceModuleName, String reportName) throws TskCoreException { @@ -5616,7 +5866,8 @@ public Report addReport(String localPath, String sourceModuleName, String report * Selects all of the rows from the reports table in the case database. * * @return A list, possibly empty, of Report data transfer objects (DTOs) - * for the rows. + * for the rows. + * * @throws TskCoreException */ public List<Report> getAllReports() throws TskCoreException { @@ -5648,6 +5899,7 @@ public List<Report> getAllReports() throws TskCoreException { * Deletes a row from the reports table in the case database. * * @param report A Report data transfer object (DTO) for the row to delete. + * * @throws TskCoreException */ public void deleteReport(Report report) throws TskCoreException { @@ -6220,9 +6472,11 @@ ResultSet executeQuery(Statement statement, String query) throws SQLException { /** * * @param statement The SQL statement to execute + * * @return returns the ResultSet from the execution of the query + * * @throws SQLException \ref query_database_page \ref - * insert_and_update_database_page + * insert_and_update_database_page */ ResultSet executeQuery(PreparedStatement statement) throws SQLException { ExecutePreparedStatementQuery executePreparedStatementQuery = new ExecutePreparedStatementQuery(statement); @@ -6373,7 +6627,7 @@ private CaseDbTransaction(CaseDbConnection connection) throws TskCoreException { * object need access to the underlying CaseDbConnection. * * @return The CaseDbConnection instance for this instance of - * CaseDbTransaction. + * CaseDbTransaction. */ private CaseDbConnection getConnection() { return this.connection; @@ -6487,8 +6741,10 @@ public void close() throws TskCoreException { * where the input object id is for a source is handled. * * @param connection A case database connection. - * @param objectId An object id. + * @param objectId An object id. + * * @return A data source object id. + * * @deprecated This only exists to support deprecated TSK object * constructors. */ @@ -6511,8 +6767,9 @@ long getDataSourceObjectId(long objectId) { * Get last (max) object id of content object in tsk_objects. * * @return currently max id + * * @throws TskCoreException exception thrown when database error occurs and - * last object id could not be queried + * last object id could not be queried * @deprecated Do not use, assumes a single-threaded, single-user case. */ @Deprecated @@ -6536,14 +6793,17 @@ public long getLastObjectId() throws TskCoreException { releaseExclusiveLock(); } } - + /** * Find and return list of files matching the specific Where clause. Use * findAllFilesWhere instead. It returns a more generic data type * * @param sqlWhereClause a SQL where clause appropriate for the desired - * files (do not begin the WHERE clause with the word WHERE!) + * files (do not begin the WHERE clause with the word + * WHERE!) + * * @return a list of FsContent each of which satisfy the given WHERE clause + * * @throws TskCoreException * @deprecated use SleuthkitCase.findAllFilesWhere() instead */ @@ -6574,12 +6834,14 @@ public List<FsContent> findFilesWhere(String sqlWhereClause) throws TskCoreExcep releaseSharedLock(); } } - + /** * Get the artifact type id associated with an artifact type name. * * @param artifactTypeName An artifact type name. + * * @return An artifact id or -1 if the attribute type does not exist. + * * @throws TskCoreException If an error occurs accessing the case database. * * @deprecated Use getArtifactType instead @@ -6607,11 +6869,12 @@ public int getArtifactTypeID(String artifactTypeName) throws TskCoreException { releaseSharedLock(); } } - + /** * Gets a list of the standard blackboard artifact type enum objects. * * @return The members of the BlackboardArtifact.ARTIFACT_TYPE enum. + * * @throws TskCoreException Specified, but not thrown. * @deprecated For a list of standard blackboard artifacts type enum * objects, use BlackboardArtifact.ARTIFACT_TYPE.values. @@ -6626,10 +6889,12 @@ public ArrayList<BlackboardArtifact.ARTIFACT_TYPE> getBlackboardArtifactTypes() * the display name need not be unique. * * @param artifactTypeName The artifact type name. - * @param displayName The artifact type display name. + * @param displayName The artifact type display name. + * * @return The artifact type id assigned to the artifact type. + * * @throws TskCoreException If there is an error adding the type to the case - * database. + * database. * @deprecated Use SleuthkitCase.addBlackboardArtifactType instead. */ @Deprecated @@ -6646,10 +6911,12 @@ public int addArtifactType(String artifactTypeName, String displayName) throws T * name must be unique, but the display name need not be unique. * * @param attrTypeString The attribute type name. - * @param displayName The attribute type display name. + * @param displayName The attribute type display name. + * * @return The attribute type id. + * * @throws TskCoreException If there is an error adding the type to the case - * database. + * database. * @deprecated Use SleuthkitCase.addArtifactAttributeType instead. */ @Deprecated @@ -6665,7 +6932,9 @@ public int addAttrType(String attrTypeString, String displayName) throws TskCore * Gets the attribute type id associated with an attribute type name. * * @param attrTypeName An attribute type name. + * * @return An attribute id or -1 if the attribute type does not exist. + * * @throws TskCoreException If an error occurs accessing the case database. * @deprecated Use SleuthkitCase.getAttributeType instead. */ @@ -6698,9 +6967,11 @@ public int getAttrTypeID(String attrTypeName) throws TskCoreException { * id does not exist * * @param attrTypeID attribute id + * * @return string associated with the given id + * * @throws TskCoreException exception thrown if a critical error occurs - * within tsk core + * within tsk core * @deprecated Use getAttributeType instead */ @Deprecated @@ -6732,9 +7003,11 @@ public String getAttrTypeString(int attrTypeID) throws TskCoreException { * error if that id does not exist * * @param attrTypeID attribute id + * * @return string associated with the given id + * * @throws TskCoreException exception thrown if a critical error occurs - * within tsk core + * within tsk core * @deprecated Use getAttributeType instead */ @Deprecated @@ -6760,11 +7033,12 @@ public String getAttrTypeDisplayName(int attrTypeID) throws TskCoreException { releaseSharedLock(); } } - + /** * Gets a list of the standard blackboard attribute type enum objects. * * @return The members of the BlackboardAttribute.ATTRIBUTE_TYPE enum. + * * @throws TskCoreException Specified, but not thrown. * @deprecated For a list of standard blackboard attribute types enum * objects, use BlackboardAttribute.ATTRIBUTE_TYP.values. @@ -6773,16 +7047,18 @@ public String getAttrTypeDisplayName(int attrTypeID) throws TskCoreException { public ArrayList<BlackboardAttribute.ATTRIBUTE_TYPE> getBlackboardAttributeTypes() throws TskCoreException { return new ArrayList<BlackboardAttribute.ATTRIBUTE_TYPE>(Arrays.asList(BlackboardAttribute.ATTRIBUTE_TYPE.values())); } - + /** * Process a read-only query on the tsk database, any table Can be used to * e.g. to find files of a given criteria. resultSetToFsContents() will * convert the files to useful objects. MUST CALL closeRunQuery() when done * * @param query the given string query to run + * * @return the resultSet from running the query. Caller MUST CALL - * closeRunQuery(resultSet) as soon as possible, when done with retrieving - * data from the resultSet + * closeRunQuery(resultSet) as soon as possible, when done with + * retrieving data from the resultSet + * * @throws SQLException if error occurred during the query * @deprecated Do not use runQuery(), use executeQuery() instead. \ref * query_database_page @@ -6810,6 +7086,7 @@ public ResultSet runQuery(String query) throws SQLException { * Closes ResultSet and its Statement previously retrieved from runQuery() * * @param resultSet with its Statement to close + * * @throws SQLException of closing the query files failed * @deprecated Do not use runQuery() and closeRunQuery(), use executeQuery() * instead. \ref query_database_page @@ -6822,5 +7099,5 @@ public void closeRunQuery(ResultSet resultSet) throws SQLException { statement.close(); } } - + } diff --git a/bindings/java/src/org/sleuthkit/datamodel/SleuthkitItemVisitor.java b/bindings/java/src/org/sleuthkit/datamodel/SleuthkitItemVisitor.java index d952342dc151c004f9f685c9413c7deeb87d6061..8f4b003cdbbe2ff2259bb3556ffc22509da5b9ad 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/SleuthkitItemVisitor.java +++ b/bindings/java/src/org/sleuthkit/datamodel/SleuthkitItemVisitor.java @@ -34,185 +34,185 @@ */ public interface SleuthkitItemVisitor<T> { - /** - * Act on (visit) a Directory content object - * - * @param d the directory to visit / act on - * - * @return result of the visit - */ - T visit(Directory d); - - /** - * Act on (visit) a File content object - * - * @param f the file to visit / act on - * - * @return result of the visit - */ - T visit(File f); - - /** - * Act on (visit) a FileSystem content object - * - * @param fs the filesystem to visit / act on - * - * @return result of the visit - */ - T visit(FileSystem fs); - - /** - * Act on (visit) an Image content object - * - * @param i the image to visit / act on - * - * @return result of the visit - */ - T visit(Image i); - - /** - * Act on (visit) a Volume content object - * - * @param v the volume to visit / act on - * - * @return result of the visit - */ - T visit(Volume v); - - /** - * Act on (visit) a VolumeSystem content object - * - * @param vs the volume system to visit / act on - * - * @return result of the visit - */ - T visit(VolumeSystem vs); - - /** - * Act on (visit) a blackboard artifact object - * - * @param ba blackboard artifact object to visit / act on - * - * @return result of the visit - */ - T visit(BlackboardArtifact ba); - - /** - * Act on (visit) a blackboard artifact type - * - * @param tw blackboard artifact type to visit / act on - * - * @return result of the visit - */ - T visit(BlackboardArtifact.ARTIFACT_TYPE tw); - - /** - * Act on (visit) a layout file content object - * - * @param lf layout file to visit / act on - * - * @return result of the visit - */ - T visit(LayoutFile lf); - - /** - * Act on (visit) a LayoutDirectory content object - * - * @param ld layout dir to visit / act on - * - * @return result of the visit - */ - T visit(VirtualDirectory ld); - - /** - * Act on (visit) a DerivedFile content object - * - * @param df derived file to visit / act on - * - * @return result of the visit - */ - T visit(DerivedFile df); - - /** - * Act on (visit) a LocalFile content object - * - * @param lf local file to visit / act on - * - * @return result of the visit - */ - T visit(LocalFile lf); - - /** - * The default visitor - quickest method for implementing a custom visitor. - * Every visit method delegates to the defaultVisit method, the only - * required method to be implemented. Then, implement the specific visit - * methods for the objects on which the algorithm needs to act differently. - * - * @param <T> generic type, signifies the object type to be returned from - * visit() - */ - static abstract public class Default<T> implements SleuthkitItemVisitor<T> { - - protected abstract T defaultVisit(SleuthkitVisitableItem s); - - @Override - public T visit(Directory d) { - return defaultVisit(d); - } - - @Override - public T visit(File f) { - return defaultVisit(f); - } - - @Override - public T visit(FileSystem fs) { - return defaultVisit(fs); - } - - @Override - public T visit(Image i) { - return defaultVisit(i); - } - - @Override - public T visit(Volume v) { - return defaultVisit(v); - } - - @Override - public T visit(VolumeSystem vs) { - return defaultVisit(vs); - } - - @Override - public T visit(BlackboardArtifact ba) { - return defaultVisit(ba); - } - - @Override - public T visit(BlackboardArtifact.ARTIFACT_TYPE tw) { - return defaultVisit(tw); - } - - @Override - public T visit(LayoutFile lf) { - return defaultVisit(lf); - } - - @Override - public T visit(VirtualDirectory vd) { - return defaultVisit(vd); - } - - @Override - public T visit(DerivedFile df) { - return defaultVisit(df); - } - - @Override - public T visit(LocalFile lf) { - return defaultVisit(lf); - } - } + /** + * Act on (visit) a Directory content object + * + * @param d the directory to visit / act on + * + * @return result of the visit + */ + T visit(Directory d); + + /** + * Act on (visit) a File content object + * + * @param f the file to visit / act on + * + * @return result of the visit + */ + T visit(File f); + + /** + * Act on (visit) a FileSystem content object + * + * @param fs the filesystem to visit / act on + * + * @return result of the visit + */ + T visit(FileSystem fs); + + /** + * Act on (visit) an Image content object + * + * @param i the image to visit / act on + * + * @return result of the visit + */ + T visit(Image i); + + /** + * Act on (visit) a Volume content object + * + * @param v the volume to visit / act on + * + * @return result of the visit + */ + T visit(Volume v); + + /** + * Act on (visit) a VolumeSystem content object + * + * @param vs the volume system to visit / act on + * + * @return result of the visit + */ + T visit(VolumeSystem vs); + + /** + * Act on (visit) a blackboard artifact object + * + * @param ba blackboard artifact object to visit / act on + * + * @return result of the visit + */ + T visit(BlackboardArtifact ba); + + /** + * Act on (visit) a blackboard artifact type + * + * @param tw blackboard artifact type to visit / act on + * + * @return result of the visit + */ + T visit(BlackboardArtifact.ARTIFACT_TYPE tw); + + /** + * Act on (visit) a layout file content object + * + * @param lf layout file to visit / act on + * + * @return result of the visit + */ + T visit(LayoutFile lf); + + /** + * Act on (visit) a LayoutDirectory content object + * + * @param ld layout dir to visit / act on + * + * @return result of the visit + */ + T visit(VirtualDirectory ld); + + /** + * Act on (visit) a DerivedFile content object + * + * @param df derived file to visit / act on + * + * @return result of the visit + */ + T visit(DerivedFile df); + + /** + * Act on (visit) a LocalFile content object + * + * @param lf local file to visit / act on + * + * @return result of the visit + */ + T visit(LocalFile lf); + + /** + * The default visitor - quickest method for implementing a custom visitor. + * Every visit method delegates to the defaultVisit method, the only + * required method to be implemented. Then, implement the specific visit + * methods for the objects on which the algorithm needs to act differently. + * + * @param <T> generic type, signifies the object type to be returned from + * visit() + */ + static abstract public class Default<T> implements SleuthkitItemVisitor<T> { + + protected abstract T defaultVisit(SleuthkitVisitableItem s); + + @Override + public T visit(Directory d) { + return defaultVisit(d); + } + + @Override + public T visit(File f) { + return defaultVisit(f); + } + + @Override + public T visit(FileSystem fs) { + return defaultVisit(fs); + } + + @Override + public T visit(Image i) { + return defaultVisit(i); + } + + @Override + public T visit(Volume v) { + return defaultVisit(v); + } + + @Override + public T visit(VolumeSystem vs) { + return defaultVisit(vs); + } + + @Override + public T visit(BlackboardArtifact ba) { + return defaultVisit(ba); + } + + @Override + public T visit(BlackboardArtifact.ARTIFACT_TYPE tw) { + return defaultVisit(tw); + } + + @Override + public T visit(LayoutFile lf) { + return defaultVisit(lf); + } + + @Override + public T visit(VirtualDirectory vd) { + return defaultVisit(vd); + } + + @Override + public T visit(DerivedFile df) { + return defaultVisit(df); + } + + @Override + public T visit(LocalFile lf) { + return defaultVisit(lf); + } + } } diff --git a/bindings/java/src/org/sleuthkit/datamodel/SleuthkitJNI.java b/bindings/java/src/org/sleuthkit/datamodel/SleuthkitJNI.java index 2ce8b82929730f3afb779affd1fd705c2a40de07..9d61c62b66942e0c9b15b34fa2bca1e5a3e61e66 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/SleuthkitJNI.java +++ b/bindings/java/src/org/sleuthkit/datamodel/SleuthkitJNI.java @@ -175,7 +175,7 @@ private CaseDbHandle(long pointer) { * system handles. * * @throws TskCoreException exception thrown if critical error occurs - * within TSK + * within TSK */ void free() throws TskCoreException { synchronized (cacheLock) { @@ -195,9 +195,11 @@ void free() throws TskCoreException { } // clear both maps - /* NOTE: it is possible to close a case while ingest is going in the background. - In this scenario it is possible for an igest module to try to read from source image. - If this happens, image will be re-opened in a normal manner. + /* + * NOTE: it is possible to close a case while ingest is going in + * the background. In this scenario it is possible for an igest + * module to try to read from source image. If this happens, + * image will be re-opened in a normal manner. */ fsHandleCache.clear(); imageHandleCache.clear(); @@ -212,11 +214,11 @@ void free() throws TskCoreException { /** * Start the process of adding a disk image to the case * - * @param timezone Timezone that image was from + * @param timezone Timezone that image was from * @param addUnallocSpace true to create virtual files for unallocated - * space the image - * @param noFatFsOrphans true if to skip processing of orphans on FAT - * filesystems + * space the image + * @param noFatFsOrphans true if to skip processing of orphans on FAT + * filesystems * * @return Object that can be used to manage the process. */ @@ -248,9 +250,10 @@ private AddImageProcess(String timezone, boolean addUnallocSpace, boolean noFatF * call either commit() or revert() after calling run(). * * @param imageFilePaths Full path(s) to the image file(s). + * * @throws TskCoreException if a critical error occurs within TSK * @throws TskDataException if a non-critical error occurs within - * TSK (should be OK to continue) + * TSK (should be OK to continue) * @deprecated Use run(String dataSourceId, String[] imageFilePaths) * instead */ @@ -263,13 +266,15 @@ public void run(String[] imageFilePaths) throws TskCoreException, TskDataExcepti * Start the process of adding an image to the case database. MUST * call either commit() or revert() after calling run(). * - * @param deviceId An ASCII-printable identifier for the device - * associated with a data source that is intended to be unique - * across multiple cases (e.g., a UUID). + * @param deviceId An ASCII-printable identifier for the + * device associated with a data source that + * is intended to be unique across multiple + * cases (e.g., a UUID). * @param imageFilePaths Full paths to the image files. + * * @throws TskCoreException if a critical error occurs within TSK * @throws TskDataException if a non-critical error occurs within - * TSK (should be OK to continue) + * TSK (should be OK to continue) */ public void run(String deviceId, String[] imageFilePaths) throws TskCoreException, TskDataException { if (autoDbPointer != 0) { @@ -292,7 +297,7 @@ public void run(String deviceId, String[] imageFilePaths) throws TskCoreExceptio * stopped run() returns. * * @throws TskCoreException exception thrown if critical error - * occurs within TSK + * occurs within TSK */ public void stop() throws TskCoreException { if (autoDbPointer == 0) { @@ -308,7 +313,7 @@ public void stop() throws TskCoreException { * operations can be performed. This method is threadsafe. * * @throws TskCoreException exception thrown if critical error - * occurs within TSK + * occurs within TSK */ public synchronized void revert() throws TskCoreException { if (autoDbPointer == 0) { @@ -325,11 +330,11 @@ public synchronized void revert() throws TskCoreException { * transaction and committing the new image data to the database. * * @return The id of the image that was added. This releases the C++ - * object and no additional operations can be performed. This method - * is threadsafe. + * object and no additional operations can be performed. + * This method is threadsafe. * * @throws TskCoreException exception thrown if critical error - * occurs within TSK + * occurs within TSK */ public synchronized long commit() throws TskCoreException { if (autoDbPointer == 0) { @@ -359,9 +364,11 @@ public synchronized String currentDirectory() { * when done. * * @param path Location to create the database at. + * * @return Handle for a new TskCaseDb instance. + * * @throws TskCoreException exception thrown if critical error occurs within - * TSK + * TSK */ static CaseDbHandle newCaseDb(String path) throws TskCoreException { return new CaseDbHandle(newCaseDbNat(path)); @@ -372,10 +379,12 @@ static CaseDbHandle newCaseDb(String path) throws TskCoreException { * when done. * * @param databaseName the name of the database to create - * @param info the connection info class for the database to create + * @param info the connection info class for the database to create + * * @return Handle for a new TskCaseDb instance. + * * @throws TskCoreException exception thrown if critical error occurs within - * TSK + * TSK */ static CaseDbHandle newCaseDb(String databaseName, CaseDbConnectionInfo info) throws TskCoreException { return new CaseDbHandle(newCaseDbMultiNat(info.getHost(), info.getPort(), info.getUserName(), info.getPassword(), info.getDbType().ordinal(), databaseName)); @@ -386,9 +395,11 @@ static CaseDbHandle newCaseDb(String databaseName, CaseDbConnectionInfo info) th * instance when done. * * @param path Location of the existing database. + * * @return Handle for a new TskCaseDb instance. + * * @throws TskCoreException exception thrown if critical error occurs within - * TSK + * TSK */ static CaseDbHandle openCaseDb(String path) throws TskCoreException { return new CaseDbHandle(openCaseDbNat(path)); @@ -399,10 +410,12 @@ static CaseDbHandle openCaseDb(String path) throws TskCoreException { * instance when done. * * @param databaseName the name of the database to open - * @param info the connection info class for the database to open + * @param info the connection info class for the database to open + * * @return Handle for a new TskCaseDb instance. + * * @throws TskCoreException exception thrown if critical error occurs within - * TSK + * TSK */ static CaseDbHandle openCaseDb(String databaseName, CaseDbConnectionInfo info) throws TskCoreException { return new CaseDbHandle(openCaseDbMultiNat(info.getHost(), info.getPort(), info.getUserName(), info.getPassword(), info.getDbType().ordinal(), databaseName)); @@ -428,9 +441,11 @@ public static void startVerboseLogging(String logPath) { * open the image and return the image info pointer * * @param imageFiles the paths to the images + * * @return the image info pointer + * * @throws TskCoreException exception thrown if critical error occurs within - * TSK + * TSK */ public static long openImage(String[] imageFiles) throws TskCoreException { long imageHandle; @@ -459,10 +474,13 @@ public static long openImage(String[] imageFiles) throws TskCoreException { * Get volume system Handle * * @param imgHandle a handle to previously opened image - * @param vsOffset byte offset in the image to the volume system (usually 0) + * @param vsOffset byte offset in the image to the volume system (usually + * 0) + * * @return pointer to a vsHandle structure in the sleuthkit + * * @throws TskCoreException exception thrown if critical error occurs within - * TSK + * TSK */ public static long openVs(long imgHandle, long vsOffset) throws TskCoreException { return openVsNat(imgHandle, vsOffset); @@ -473,10 +491,12 @@ public static long openVs(long imgHandle, long vsOffset) throws TskCoreException * Get volume Handle * * @param vsHandle pointer to the volume system structure in the sleuthkit - * @param volId id of the volume + * @param volId id of the volume + * * @return pointer to a volHandle structure in the sleuthkit + * * @throws TskCoreException exception thrown if critical error occurs within - * TSK + * TSK */ public static long openVsPart(long vsHandle, long volId) throws TskCoreException { //returned long is ptr to vs Handle object in tsk @@ -488,10 +508,12 @@ public static long openVsPart(long vsHandle, long volId) throws TskCoreException * not need be reopened next time for the duration of the application * * @param imgHandle pointer to imgHandle in sleuthkit - * @param fsOffset byte offset to the file system + * @param fsOffset byte offset to the file system + * * @return pointer to a fsHandle structure in the sleuthkit + * * @throws TskCoreException exception thrown if critical error occurs within - * TSK + * TSK */ public static long openFs(long imgHandle, long fsOffset) throws TskCoreException { long fsHandle; @@ -513,12 +535,14 @@ public static long openFs(long imgHandle, long fsOffset) throws TskCoreException * Get file Handle * * @param fsHandle fsHandle pointer in the sleuthkit - * @param fileId id of the file + * @param fileId id of the file * @param attrType file attribute type to open - * @param attrId file attribute id to open + * @param attrId file attribute id to open + * * @return pointer to a file structure in the sleuthkit + * * @throws TskCoreException exception thrown if critical error occurs within - * TSK + * TSK */ public static long openFile(long fsHandle, long fileId, TSK_FS_ATTR_TYPE_ENUM attrType, int attrId) throws TskCoreException { return openFileNat(fsHandle, fileId, attrType.getValue(), attrId); @@ -530,12 +554,14 @@ public static long openFile(long fsHandle, long fileId, TSK_FS_ATTR_TYPE_ENUM at * * @param imgHandle * @param readBuffer buffer to read to - * @param offset byte offset in the image to start at - * @param len amount of data to read + * @param offset byte offset in the image to start at + * @param len amount of data to read + * * @return the number of characters read, or -1 if the end of the stream has - * been reached + * been reached + * * @throws TskCoreException exception thrown if critical error occurs within - * TSK + * TSK */ public static int readImg(long imgHandle, byte[] readBuffer, long offset, long len) throws TskCoreException { //returned byte[] is the data buffer @@ -545,14 +571,16 @@ public static int readImg(long imgHandle, byte[] readBuffer, long offset, long l /** * reads data from an volume system * - * @param vsHandle pointer to a volume system structure in the sleuthkit + * @param vsHandle pointer to a volume system structure in the sleuthkit * @param readBuffer buffer to read to - * @param offset sector offset in the image to start at - * @param len amount of data to read + * @param offset sector offset in the image to start at + * @param len amount of data to read + * * @return the number of characters read, or -1 if the end of the stream has - * been reached + * been reached + * * @throws TskCoreException exception thrown if critical error occurs within - * TSK + * TSK */ public static int readVs(long vsHandle, byte[] readBuffer, long offset, long len) throws TskCoreException { return readVsNat(vsHandle, readBuffer, offset, len); @@ -561,14 +589,16 @@ public static int readVs(long vsHandle, byte[] readBuffer, long offset, long len /** * reads data from an volume * - * @param volHandle pointer to a volume structure in the sleuthkit + * @param volHandle pointer to a volume structure in the sleuthkit * @param readBuffer buffer to read to - * @param offset byte offset in the image to start at - * @param len amount of data to read + * @param offset byte offset in the image to start at + * @param len amount of data to read + * * @return the number of characters read, or -1 if the end of the stream has - * been reached + * been reached + * * @throws TskCoreException exception thrown if critical error occurs within - * TSK + * TSK */ public static int readVsPart(long volHandle, byte[] readBuffer, long offset, long len) throws TskCoreException { //returned byte[] is the data buffer @@ -578,14 +608,16 @@ public static int readVsPart(long volHandle, byte[] readBuffer, long offset, lon /** * reads data from an file system * - * @param fsHandle pointer to a file system structure in the sleuthkit + * @param fsHandle pointer to a file system structure in the sleuthkit * @param readBuffer buffer to read to - * @param offset byte offset in the image to start at - * @param len amount of data to read + * @param offset byte offset in the image to start at + * @param len amount of data to read + * * @return the number of characters read, or -1 if the end of the stream has - * been reached + * been reached + * * @throws TskCoreException exception thrown if critical error occurs within - * TSK + * TSK */ public static int readFs(long fsHandle, byte[] readBuffer, long offset, long len) throws TskCoreException { //returned byte[] is the data buffer @@ -597,12 +629,14 @@ public static int readFs(long fsHandle, byte[] readBuffer, long offset, long len * * @param fileHandle pointer to a file structure in the sleuthkit * @param readBuffer pre-allocated buffer to read to - * @param offset byte offset in the image to start at - * @param len amount of data to read + * @param offset byte offset in the image to start at + * @param len amount of data to read + * * @return the number of characters read, or -1 if the end of the stream has - * been reached + * been reached + * * @throws TskCoreException exception thrown if critical error occurs within - * TSK + * TSK */ public static int readFile(long fileHandle, byte[] readBuffer, long offset, long len) throws TskCoreException { return readFileNat(fileHandle, readBuffer, offset, len); @@ -613,7 +647,9 @@ public static int readFile(long fileHandle, byte[] readBuffer, long offset, long * the 'istat' TSK tool * * @param fileHandle pointer to file structure in the sleuthkit + * * @return text + * * @throws TskCoreException if errors occurred */ public static List<String> getFileMetaDataText(long fileHandle) throws TskCoreException { @@ -689,6 +725,7 @@ public static void closeFile(long fileHandle) { * Create an index for a hash database. * * @param dbHandle A hash database handle. + * * @throws TskCoreException if a critical error occurs within TSK core */ public static void createLookupIndexForHashDatabase(int dbHandle) throws TskCoreException { @@ -699,7 +736,9 @@ public static void createLookupIndexForHashDatabase(int dbHandle) throws TskCore * Check if an index exists for a hash database. * * @param dbHandle A hash database handle. + * * @return true if index exists + * * @throws TskCoreException if a critical error occurs within TSK core */ public static boolean hashDatabaseHasLookupIndex(int dbHandle) throws TskCoreException { @@ -710,8 +749,10 @@ public static boolean hashDatabaseHasLookupIndex(int dbHandle) throws TskCoreExc * hashDatabaseCanBeReindexed * * @param dbHandle previously opened hash db handle + * * @return Does this database have a source database that is different than - * the index? + * the index? + * * @throws TskCoreException if a critical error occurs within TSK core */ public static boolean hashDatabaseCanBeReindexed(int dbHandle) throws TskCoreException { @@ -722,7 +763,9 @@ public static boolean hashDatabaseCanBeReindexed(int dbHandle) throws TskCoreExc * getHashDatabasePath * * @param dbHandle previously opened hash db handle + * * @return Hash db file path + * * @throws TskCoreException if a critical error occurs within TSK core */ public static String getHashDatabasePath(int dbHandle) throws TskCoreException { @@ -733,7 +776,9 @@ public static String getHashDatabasePath(int dbHandle) throws TskCoreException { * getHashDatabaseIndexPath * * @param dbHandle previously opened hash db handle + * * @return Index file path + * * @throws TskCoreException if a critical error occurs within TSK core */ public static String getHashDatabaseIndexPath(int dbHandle) throws TskCoreException { @@ -748,7 +793,9 @@ public static int openHashDatabase(String path) throws TskCoreException { * Creates a hash database. Will be of the default TSK hash database type. * * @param path The path to the database + * * @return a handle for that database + * * @throws TskCoreException if a critical error occurs within TSK core */ public static int createHashDatabase(String path) throws TskCoreException { @@ -759,7 +806,7 @@ public static int createHashDatabase(String path) throws TskCoreException { * Close the currently open lookup databases. Resets the handle counting. * * @throws TskCoreException exception thrown if critical error occurs within - * TSK + * TSK */ public static void closeAllHashDatabases() throws TskCoreException { hashDbCloseAll(); @@ -770,7 +817,7 @@ public static void closeAllHashDatabases() throws TskCoreException { * affected. * * @throws TskCoreException exception thrown if critical error occurs within - * TSK + * TSK */ public static void closeHashDatabase(int dbHandle) throws TskCoreException { hashDbClose(dbHandle); @@ -780,6 +827,7 @@ public static void closeHashDatabase(int dbHandle) throws TskCoreException { * Get the name of the database * * @param dbHandle previously opened hash db handle + * * @throws TskCoreException if a critical error occurs within TSK core */ public static String getHashDatabaseDisplayName(int dbHandle) throws TskCoreException { @@ -789,9 +837,11 @@ public static String getHashDatabaseDisplayName(int dbHandle) throws TskCoreExce /** * Lookup the given hash value and get basic answer * - * @param hash Hash value to search for + * @param hash Hash value to search for * @param dbHandle Handle of database to lookup in. + * * @return True if hash was found in database. + * * @throws TskCoreException */ public static boolean lookupInHashDatabase(String hash, int dbHandle) throws TskCoreException { @@ -802,9 +852,11 @@ public static boolean lookupInHashDatabase(String hash, int dbHandle) throws Tsk * Lookup hash value in DB and return details on results (more time * consuming than basic lookup) * - * @param hash Hash value to search for + * @param hash Hash value to search for * @param dbHandle Handle of database to lookup in. + * * @return Details on hash if it was in DB or null if it was not found. + * * @throws TskCoreException */ public static HashHitInfo lookupInHashDatabaseVerbose(String hash, int dbHandle) throws TskCoreException { @@ -815,11 +867,12 @@ public static HashHitInfo lookupInHashDatabaseVerbose(String hash, int dbHandle) * Adds a hash value to a hash database. * * @param filename Name of file (can be null) - * @param md5 Text of MD5 hash (can be null) - * @param sha1 Text of SHA1 hash (can be null) - * @param sha256 Text of SHA256 hash (can be null) - * @param comment A comment (can be null) + * @param md5 Text of MD5 hash (can be null) + * @param sha1 Text of SHA1 hash (can be null) + * @param sha256 Text of SHA256 hash (can be null) + * @param comment A comment (can be null) * @param dbHandle Handle to DB + * * @throws TskCoreException */ public static void addToHashDatabase(String filename, String md5, String sha1, String sha256, String comment, int dbHandle) throws TskCoreException { @@ -857,8 +910,9 @@ public static boolean hashDatabaseIsIndexOnly(int dbHandle) throws TskCoreExcept * passed in from long to short form * * @param timezoneLongForm the long form (e.g., America/New_York) + * * @return the short form (e.g., EST5EDT) string representation, or an empty - * string if empty long form was passed in + * string if empty long form was passed in */ private static String timezoneLongToShort(String timezoneLongForm) { if (timezoneLongForm == null || timezoneLongForm.isEmpty()) { @@ -891,9 +945,11 @@ private static String timezoneLongToShort(String timezoneLongForm) { * devPath * * @param devPath device path pointing to the device + * * @return size of the device in bytes + * * @throws TskCoreException exception thrown if the device size could not be - * queried + * queried */ public static long findDeviceSize(String devPath) throws TskCoreException { return findDeviceSizeNat(devPath); diff --git a/bindings/java/src/org/sleuthkit/datamodel/SleuthkitVisitableItem.java b/bindings/java/src/org/sleuthkit/datamodel/SleuthkitVisitableItem.java index a2eab34609fa43eb082fea1642b10976f6ff1e0b..b60e4e3d1e791bf0cc471f0cebf122df4d47af9f 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/SleuthkitVisitableItem.java +++ b/bindings/java/src/org/sleuthkit/datamodel/SleuthkitVisitableItem.java @@ -27,6 +27,7 @@ public interface SleuthkitVisitableItem { * visitor pattern support * * @param v visitor + * * @return visitor return value */ public <T> T accept(SleuthkitItemVisitor<T> v); diff --git a/bindings/java/src/org/sleuthkit/datamodel/TagName.java b/bindings/java/src/org/sleuthkit/datamodel/TagName.java index 5c65066fa5c9ab24681da424864cf9ac6b1b0f90..e4fe1eb50d4f8efeae2c04058a9d7f8fe580b641 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/TagName.java +++ b/bindings/java/src/org/sleuthkit/datamodel/TagName.java @@ -108,6 +108,7 @@ public HTML_COLOR getColor() { * Compares two TagName objects by comparing their display names. * * @param other The other TagName to compare this TagName to + * * @return the result of calling compareTo on the displayNames */ @Override diff --git a/bindings/java/src/org/sleuthkit/datamodel/TskCoreException.java b/bindings/java/src/org/sleuthkit/datamodel/TskCoreException.java index ab682390413013335c95cd6857b739848ea61a11..d40386ed781f1b5291c60a3aa51a966c01f1b4a0 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/TskCoreException.java +++ b/bindings/java/src/org/sleuthkit/datamodel/TskCoreException.java @@ -46,7 +46,7 @@ public TskCoreException(String msg) { * Create exception containing the error message and cause exception * * @param msg the message - * @param ex cause exception + * @param ex cause exception */ public TskCoreException(String msg, Exception ex) { super(msg, ex); diff --git a/bindings/java/src/org/sleuthkit/datamodel/TskData.java b/bindings/java/src/org/sleuthkit/datamodel/TskData.java index 66cd85bab79accdea123a0ae9306b888fa27a3b1..5ffaef8414a504c9e04446bf516ab235468c6ca8 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/TskData.java +++ b/bindings/java/src/org/sleuthkit/datamodel/TskData.java @@ -24,17 +24,17 @@ import java.util.Set; /** - * Contains enums for the integer values stored in the database and returned by the - * various data model objects. + * Contains enums for the integer values stored in the database and returned by + * the various data model objects. */ public class TskData { private static ResourceBundle bundle = ResourceBundle.getBundle("org.sleuthkit.datamodel.Bundle"); - /** - * The type of the file system file, as reported in the name structure of the file system. - * This is the dir_type column in the tsk_files table. - */ + /** + * The type of the file system file, as reported in the name structure of + * the file system. This is the dir_type column in the tsk_files table. + */ public enum TSK_FS_NAME_TYPE_ENUM { UNDEF(0, "-"), ///< Unknown type @@ -79,6 +79,7 @@ public String getLabel() { * Convert to the enum type from the short value * * @param dir_type enum type value to convert + * * @return converted long value */ static public TSK_FS_NAME_TYPE_ENUM valueOf(short dir_type) { @@ -92,10 +93,10 @@ static public TSK_FS_NAME_TYPE_ENUM valueOf(short dir_type) { } } - /** - * The type of the file system file, as reported in the metadata structure of the file system. - * This is the meta_type column in the tsk_files table. - */ + /** + * The type of the file system file, as reported in the metadata structure + * of the file system. This is the meta_type column in the tsk_files table. + */ public enum TSK_FS_META_TYPE_ENUM { TSK_FS_META_TYPE_UNDEF(0, "-"), @@ -143,10 +144,11 @@ public static TSK_FS_META_TYPE_ENUM valueOf(short metaType) { } } - /** - * The allocated status of a file system file, as reported in the name structure of the file system. - * This is the dir_flags column in the tsk_files table. - */ + /** + * The allocated status of a file system file, as reported in the name + * structure of the file system. This is the dir_flags column in the + * tsk_files table. + */ public enum TSK_FS_NAME_FLAG_ENUM { ALLOC(1, bundle.getString("TskData.tskFsNameFlagEnum.allocated")), ///< Name is in an allocated state @@ -178,6 +180,7 @@ public String toString() { * Convert dirFlag int value to the enum type * * @param dirFlag int value to convert + * * @return the enum type corresponding to dirFlag */ public static TSK_FS_NAME_FLAG_ENUM valueOf(int dirFlag) { @@ -191,10 +194,11 @@ public static TSK_FS_NAME_FLAG_ENUM valueOf(int dirFlag) { } } - /** - * The allocated status of the file system file, as reported in the metadata structure of the file system. - * This is the meta_flags column in the tsk_files table. - */ + /** + * The allocated status of the file system file, as reported in the metadata + * structure of the file system. This is the meta_flags column in the + * tsk_files table. + */ public enum TSK_FS_META_FLAG_ENUM { ALLOC(1, bundle.getString("TskData.tskFsMetaFlagEnum.allocated")), ///< Metadata structure is currently in an allocated state @@ -235,6 +239,7 @@ public String toString() { * Returns all the enum elements that match the flags in metaFlag * * @param metaFlags Flags to convert to Enums. + * * @return matching TSK_FS_META_FLAG_ENUM elements */ public static Set<TSK_FS_META_FLAG_ENUM> valuesOf(short metaFlags) { @@ -261,10 +266,10 @@ public static short toInt(Set<TSK_FS_META_FLAG_ENUM> metaFlags) { } - /** - * Type of data that is stored in the attribute for a file system file. - * This is the attr_type column in the tsk_files table. - */ + /** + * Type of data that is stored in the attribute for a file system file. This + * is the attr_type column in the tsk_files table. + */ public enum TSK_FS_ATTR_TYPE_ENUM { TSK_FS_ATTR_TYPE_NOT_FOUND(0x00), // 0 @@ -318,8 +323,8 @@ public static TSK_FS_ATTR_TYPE_ENUM valueOf(int val) { }; /** - * Flags for a partition in the disk image. - * This is the flags column in the tsk_vs_parts table. + * Flags for a partition in the disk image. This is the flags column in the + * tsk_vs_parts table. */ public enum TSK_VS_PART_FLAG_ENUM { @@ -345,12 +350,14 @@ public long getVsFlag() { } - /** - * The permissions of a file system file. - * This is the mode column in the tsk_files table. - */ + /** + * The permissions of a file system file. This is the mode column in the + * tsk_files table. + */ public enum TSK_FS_META_MODE_ENUM { - /* The following describe the file permissions */ + /* + * The following describe the file permissions + */ TSK_FS_META_MODE_ISUID(0004000), ///< set user id on execution TSK_FS_META_MODE_ISGID(0002000), ///< set group id on execution @@ -388,6 +395,7 @@ public short getMode() { * given modes * * @param modes + * * @return matching TSK_FS_META_MODE_ENUM elements */ public static Set<TSK_FS_META_MODE_ENUM> valuesOf(short modes) { @@ -406,6 +414,7 @@ public static Set<TSK_FS_META_MODE_ENUM> valuesOf(short modes) { /** * @param modes the set of modes to convert + * * @return the short int representing the given set of modes */ public static short toInt(Set<TSK_FS_META_MODE_ENUM> modes) { @@ -417,11 +426,10 @@ public static short toInt(Set<TSK_FS_META_MODE_ENUM> modes) { } }; - - /** - * The type of the file system. - * This is the fs_type column in the tsk_fs_info table. - */ + /** + * The type of the file system. This is the fs_type column in the + * tsk_fs_info table. + */ public enum TSK_FS_TYPE_ENUM { TSK_FS_TYPE_DETECT(0x00000000), ///< Use autodetection methods @@ -472,6 +480,7 @@ public int getValue() { * enum type * * @param fsTypeValue int value to convert + * * @return the enum type - first enum type matching the fsTypeValue */ public static TSK_FS_TYPE_ENUM valueOf(int fsTypeValue) { @@ -486,11 +495,11 @@ public static TSK_FS_TYPE_ENUM valueOf(int fsTypeValue) { }; - /** - * The type of the disk image. - * This is the types column in the tsk_images_info table. - */ - public enum TSK_IMG_TYPE_ENUM { + /** + * The type of the disk image. This is the types column in the + * tsk_images_info table. + */ + public enum TSK_IMG_TYPE_ENUM { TSK_IMG_TYPE_DETECT(0, bundle.getString("TskData.tskImgTypeEnum.autoDetect")), // Auto Detection TSK_IMG_TYPE_RAW_SING(1, bundle.getString("TskData.tskImgTypeEnum.rawSingle")), // Single raw file (dd) @@ -541,11 +550,11 @@ public String getName() { } }; - /** - * The type of the partition in the partition table. - * This is the flags column in the tsk_vs_parts table. - */ - public enum TSK_VS_TYPE_ENUM { + /** + * The type of the partition in the partition table. This is the flags + * column in the tsk_vs_parts table. + */ + public enum TSK_VS_TYPE_ENUM { TSK_VS_TYPE_DETECT(0x0000, bundle.getString("TskData.tskVSTypeEnum.autoDetect")), ///< Use autodetection methods TSK_VS_TYPE_DOS(0x0001, "DOS"), ///< DOS Partition table NON-NLS @@ -593,11 +602,10 @@ public String getName() { } }; - - /** - * High-level type of an object from the database. - * This is the type column in the tsk_objects table. - */ + /** + * High-level type of an object from the database. This is the type column + * in the tsk_objects table. + */ public enum ObjectType { IMG(0), ///< Disk Image - see tsk_image_info for more details @@ -625,6 +633,7 @@ public short getObjectType() { * Convert object type short value to the enum type * * @param objectType long value to convert + * * @return the enum type */ public static ObjectType valueOf(short objectType) { @@ -638,9 +647,10 @@ public static ObjectType valueOf(short objectType) { } } - /** - * The type of file in a database, such as file system versus local file. - * This is the type field in the tsk_files table. */ + /** + * The type of file in a database, such as file system versus local file. + * This is the type field in the tsk_files table. + */ public enum TSK_DB_FILES_TYPE_ENUM { FS(0, "File System"), ///< File that can be found in file system tree. @@ -664,6 +674,7 @@ private TSK_DB_FILES_TYPE_ENUM(int fileType, String name) { * Convert db files type short value to the enum type * * @param fileType long value to convert + * * @return the enum type */ public static TSK_DB_FILES_TYPE_ENUM valueOf(short fileType) { @@ -690,10 +701,10 @@ public String getName() { } } - /** - * Identifies if a file was in a hash database or not. - * This is the known column in the tsk_files table. - */ + /** + * Identifies if a file was in a hash database or not. This is the known + * column in the tsk_files table. + */ public enum FileKnown { UNKNOWN(0, bundle.getString("TskData.fileKnown.unknown")), ///< File marked as unknown by hash db @@ -712,6 +723,7 @@ private FileKnown(int known, String name) { * Convert file known type byte value to the enum type * * @param known long value to convert + * * @return the enum type */ public static FileKnown valueOf(byte known) { diff --git a/bindings/java/src/org/sleuthkit/datamodel/TskDataException.java b/bindings/java/src/org/sleuthkit/datamodel/TskDataException.java index 63453dddf67de6a7506b9c0d30e7f9baea6eac13..96141e591a79db2b68e903ea05009eb7f6634f68 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/TskDataException.java +++ b/bindings/java/src/org/sleuthkit/datamodel/TskDataException.java @@ -45,7 +45,7 @@ public TskDataException(String msg) { * Create exception containing the error message and cause exception * * @param msg the message - * @param ex cause exception + * @param ex cause exception */ public TskDataException(String msg, Exception ex) { super(msg, ex); diff --git a/bindings/java/src/org/sleuthkit/datamodel/TskException.java b/bindings/java/src/org/sleuthkit/datamodel/TskException.java index 315197c0d232675a5147d9a70aa67cd1641b1fd0..7a3360b2de0ca2368ca6a9841c133af46ea28174 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/TskException.java +++ b/bindings/java/src/org/sleuthkit/datamodel/TskException.java @@ -38,7 +38,7 @@ public TskException(String msg) { * Create exception containing the error message and cause exception * * @param msg the message - * @param ex cause exception + * @param ex cause exception */ public TskException(String msg, Exception ex) { super(msg, ex); diff --git a/bindings/java/src/org/sleuthkit/datamodel/TskFileRange.java b/bindings/java/src/org/sleuthkit/datamodel/TskFileRange.java index 075492ce2968b40f600c8d000f7f207c7cd98b1d..61d19fe412dad082784c7cf92ed3eeabd6357e03 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/TskFileRange.java +++ b/bindings/java/src/org/sleuthkit/datamodel/TskFileRange.java @@ -34,8 +34,8 @@ public class TskFileRange { * Create file range to map the database object * * @param byteStart byte start with respect to the image - * @param byteLen length of the range in bytes - * @param sequence sequence order of the range for the file + * @param byteLen length of the range in bytes + * @param sequence sequence order of the range for the file */ public TskFileRange(long byteStart, long byteLen, long sequence) { this.byteStart = byteStart; diff --git a/bindings/java/src/org/sleuthkit/datamodel/VirtualDirectory.java b/bindings/java/src/org/sleuthkit/datamodel/VirtualDirectory.java index 84e1f2b46952942dcb5c0c71137646e70abb4c9a..7cc3088988630a5c3440478b5679c3a822aac5aa 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/VirtualDirectory.java +++ b/bindings/java/src/org/sleuthkit/datamodel/VirtualDirectory.java @@ -51,33 +51,38 @@ public class VirtualDirectory extends AbstractFile { * directory can also be a data source, with local/logical files as its * children. Not a file system directory. * - * @param db The case database. - * @param objId The object id of the virtual directory. + * @param db The case database. + * @param objId The object id of the virtual directory. * @param dataSourceObjectId The object id of the data source for the - * virtual directory; same as objId if the virtual directory is a data - * source. - * @param name The name of the virtual directory. - * @param dirType The TSK_FS_NAME_TYPE_ENUM for the virtual directory. - * @param metaType The TSK_FS_META_TYPE_ENUM for the virtual directory. - * @param dirFlag The TSK_FS_META_TYPE_ENUM for the virtual directory. - * @param metaFlags The meta flags for the virtual directory. - * @param size The size of the virtual directory, should be zero. - * @param md5Hash The MD5 hash for the virtual directory. - * @param knownState The known state for the virtual directory - * @param parentPath The parent path for the virtual directory, should be - * "/" if the virtual directory is a data source. + * virtual directory; same as objId if the virtual + * directory is a data source. + * @param name The name of the virtual directory. + * @param dirType The TSK_FS_NAME_TYPE_ENUM for the virtual + * directory. + * @param metaType The TSK_FS_META_TYPE_ENUM for the virtual + * directory. + * @param dirFlag The TSK_FS_META_TYPE_ENUM for the virtual + * directory. + * @param metaFlags The meta flags for the virtual directory. + * @param size The size of the virtual directory, should be + * zero. + * @param md5Hash The MD5 hash for the virtual directory. + * @param knownState The known state for the virtual directory + * @param parentPath The parent path for the virtual directory, + * should be "/" if the virtual directory is a + * data source. */ - VirtualDirectory(SleuthkitCase db, - long objId, - long dataSourceObjectId, - String name, - TSK_FS_NAME_TYPE_ENUM dirType, TSK_FS_META_TYPE_ENUM metaType, + VirtualDirectory(SleuthkitCase db, + long objId, + long dataSourceObjectId, + String name, + TSK_FS_NAME_TYPE_ENUM dirType, TSK_FS_META_TYPE_ENUM metaType, TSK_FS_NAME_FLAG_ENUM dirFlag, short metaFlags, - String md5Hash, FileKnown knownState, + String md5Hash, FileKnown knownState, String parentPath) { super(db, objId, dataSourceObjectId, TSK_FS_ATTR_TYPE_ENUM.TSK_FS_ATTR_TYPE_DEFAULT, (short) 0, name, TskData.TSK_DB_FILES_TYPE_ENUM.VIRTUAL_DIR, 0L, 0, dirType, metaType, dirFlag, - metaFlags, 0L, 0L, 0L, 0L, 0L, (short) 0, 0, 0, md5Hash, knownState, parentPath, null); + metaFlags, 0L, 0L, 0L, 0L, 0L, (short) 0, 0, 0, md5Hash, knownState, parentPath, null); } /** @@ -95,8 +100,9 @@ public boolean isDataSource() { * returns the virtual directory. * * @return The data source. + * * @throws TskCoreException if there was an error querying the case - * database. + * database. */ @Override public Content getDataSource() throws TskCoreException { @@ -112,8 +118,9 @@ public Content getDataSource() throws TskCoreException { * Gets the children of this virtual directory. * * @return List of children. + * * @throws TskCoreException if there was an error querying the case - * database. + * database. */ @Override public List<Content> getChildren() throws TskCoreException { @@ -124,8 +131,9 @@ public List<Content> getChildren() throws TskCoreException { * Gets the object ids of the children of this virtual directory. * * @return List of child object ids. + * * @throws TskCoreException if there was an error querying the case - * database. + * database. */ @Override public List<Long> getChildrenIds() throws TskCoreException { @@ -137,8 +145,9 @@ public List<Long> getChildrenIds() throws TskCoreException { * within its data source, always an empty list. * * @return An empty list. + * * @throws TskCoreException if there was an error querying the case - * database. + * database. */ @Override public List<TskFileRange> getRanges() throws TskCoreException { @@ -167,7 +176,8 @@ public boolean isRoot() { * Accepts a content visitor (Visitor design pattern). * * @param visitor A ContentVisitor supplying an algorithm to run using this - * virtual directory as input. + * virtual directory as input. + * * @return The output of the algorithm. */ @Override @@ -179,7 +189,8 @@ public <T> T accept(ContentVisitor<T> visitor) { * Accepts a Sleuthkit item visitor (Visitor design pattern). * * @param visitor A SleuthkitItemVisitor supplying an algorithm to run using - * this virtual directory as input. + * this virtual directory as input. + * * @return The output of the algorithm. */ @Override @@ -191,9 +202,10 @@ public <T> T accept(SleuthkitItemVisitor<T> visitor) { * Provides a string representation of this virtual directory. * * @param preserveState True if state should be included in the string - * representation of this object. + * representation of this object. + * * @throws TskCoreException if there was an error querying the case - * database. + * database. */ @Override public String toString(boolean preserveState) { @@ -206,34 +218,39 @@ public String toString(boolean preserveState) { * directory can also be a data source, with local/logical files as its * children. Not a file system directory. * - * @param db The case database. - * @param objId The object id of the virtual directory. + * @param db The case database. + * @param objId The object id of the virtual directory. * @param dataSourceObjectId The object id of the data source for the - * virtual directory; same as objId if the virtual directory is a data - * source. - * @param name The name of the virtual directory. - * @param dirType The TSK_FS_NAME_TYPE_ENUM for the virtual directory. - * @param metaType The TSK_FS_META_TYPE_ENUM for the virtual directory. - * @param dirFlag The TSK_FS_META_TYPE_ENUM for the virtual directory. - * @param metaFlags The meta flags for the virtual directory. - * @param size The size value for the virtual directory - * @param md5Hash The MD5 hash for the virtual directory. - * @param knownState The known state for the virtual directory - * @param parentPath The parent path for the virtual directory, should be - * "/" if the virtual directory is a data source. + * virtual directory; same as objId if the virtual + * directory is a data source. + * @param name The name of the virtual directory. + * @param dirType The TSK_FS_NAME_TYPE_ENUM for the virtual + * directory. + * @param metaType The TSK_FS_META_TYPE_ENUM for the virtual + * directory. + * @param dirFlag The TSK_FS_META_TYPE_ENUM for the virtual + * directory. + * @param metaFlags The meta flags for the virtual directory. + * @param size The size value for the virtual directory + * @param md5Hash The MD5 hash for the virtual directory. + * @param knownState The known state for the virtual directory + * @param parentPath The parent path for the virtual directory, + * should be "/" if the virtual directory is a + * data source. + * * @deprecated Do not make subclasses outside of this package. */ @Deprecated @SuppressWarnings("deprecation") - VirtualDirectory(SleuthkitCase db, - long objId, - String name, - TSK_FS_NAME_TYPE_ENUM dirType, TSK_FS_META_TYPE_ENUM metaType, + VirtualDirectory(SleuthkitCase db, + long objId, + String name, + TSK_FS_NAME_TYPE_ENUM dirType, TSK_FS_META_TYPE_ENUM metaType, TSK_FS_NAME_FLAG_ENUM dirFlag, short metaFlags, - long size, - String md5Hash, FileKnown knownState, + long size, + String md5Hash, FileKnown knownState, String parentPath) { this(db, objId, db.getDataSourceObjectId(objId), name, dirType, metaType, dirFlag, metaFlags, md5Hash, knownState, parentPath); } - + } diff --git a/bindings/java/src/org/sleuthkit/datamodel/Volume.java b/bindings/java/src/org/sleuthkit/datamodel/Volume.java index b57fa31685c57fa56e52a359e7980b98d1c297e4..84d5c55a6310185586c6ee88af9a6e537abca145 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/Volume.java +++ b/bindings/java/src/org/sleuthkit/datamodel/Volume.java @@ -39,10 +39,10 @@ public class Volume extends AbstractContent { /** * Constructor to create the data object mapped from tsk_vs_parts entry * - * @param db database object + * @param db database object * @param obj_id * @param addr - * @param startSector starting sector, relative to start of VS + * @param startSector starting sector, relative to start of VS * @param lengthInSectors * @param flags * @param desc @@ -182,6 +182,7 @@ public String getDescription() { * Convert volume type flag to string * * @param vsFlag long flag to convert + * * @return string representation */ public static String vsFlagToValue(long vsFlag) { @@ -200,6 +201,7 @@ public static String vsFlagToValue(long vsFlag) { * Convert volume flag string to long * * @param vsFlag string representation of the flag + * * @return long representation of the flag */ public static long valueToVsFlag(String vsFlag) { @@ -218,6 +220,7 @@ public static long valueToVsFlag(String vsFlag) { * Convert long representation of the flag to user readable format * * @param vsFlag long repr. of the flag + * * @return user readable string representation */ public static String vsFlagToString(long vsFlag) { @@ -264,6 +267,7 @@ public List<Long> getChildrenIds() throws TskCoreException { /** * @return a list of FileSystem that are direct descendents of this Image. + * * @throws TskCoreException */ public List<FileSystem> getFileSystems() throws TskCoreException { diff --git a/bindings/java/src/org/sleuthkit/datamodel/VolumeSystem.java b/bindings/java/src/org/sleuthkit/datamodel/VolumeSystem.java index 8a4f5917e6233995b258725339f162d0b8886c70..85132bea6d8c38e828c60a17adf2a1377954143d 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/VolumeSystem.java +++ b/bindings/java/src/org/sleuthkit/datamodel/VolumeSystem.java @@ -33,10 +33,10 @@ public class VolumeSystem extends AbstractContent { /** * Constructor most inputs are from the database * - * @param db case database handle - * @param obj_id the unique content object id for the volume system - * @param name name of the volume system - * @param type type of the volume system + * @param db case database handle + * @param obj_id the unique content object id for the volume system + * @param name name of the volume system + * @param type type of the volume system * @param imgOffset offset of the volume system with respect to image * @param blockSize block size of this volume system */ @@ -94,6 +94,7 @@ public long getBlockSize() { * otherwise resuse the existing handle. * * @return volume system Handle pointer + * * @throws TskException */ protected synchronized long getVolumeSystemHandle() throws TskCoreException { @@ -153,6 +154,7 @@ public List<Long> getChildrenIds() throws TskCoreException { /** * @return a list of Volumes that are direct children of this VolumeSystem + * * @throws TskCoreException */ public List<Volume> getVolumes() throws TskCoreException {