Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sleuthkit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IRT
Sleuthkit
Commits
e26501e0
Commit
e26501e0
authored
11 years ago
by
Brian Carrier
Browse files
Options
Downloads
Patches
Plain Diff
Updated VolumeSystem.getType to return ENUM instead of long
parent
9dfd6368
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bindings/java/src/org/sleuthkit/datamodel/TskData.java
+28
-9
28 additions, 9 deletions
bindings/java/src/org/sleuthkit/datamodel/TskData.java
bindings/java/src/org/sleuthkit/datamodel/VolumeSystem.java
+3
-2
3 additions, 2 deletions
bindings/java/src/org/sleuthkit/datamodel/VolumeSystem.java
with
31 additions
and
11 deletions
bindings/java/src/org/sleuthkit/datamodel/TskData.java
+
28
−
9
View file @
e26501e0
...
...
@@ -499,19 +499,30 @@ public String getName() {
* Volume System type
*/
public
enum
TSK_VS_TYPE_ENUM
{
TSK_VS_TYPE_DETECT
(
0x0000
),
///< Use autodetection methods
TSK_VS_TYPE_DOS
(
0x0001
),
///< DOS Partition table
TSK_VS_TYPE_BSD
(
0x0002
),
///< BSD Partition table
TSK_VS_TYPE_SUN
(
0x0004
),
///< Sun VTOC
TSK_VS_TYPE_MAC
(
0x0008
),
///< Mac partition table
TSK_VS_TYPE_GPT
(
0x0010
),
///< GPT partition table
TSK_VS_TYPE_DBFILLER
(
0x00F0
),
///< fake partition table type for loaddb (for images that do not have a volume system)
TSK_VS_TYPE_UNSUPP
(
0xFFFF
);
///< Unsupported
TSK_VS_TYPE_DETECT
(
0x0000
,
"Auto Detect"
),
///< Use autodetection methods
TSK_VS_TYPE_DOS
(
0x0001
,
"DOS"
),
///< DOS Partition table
TSK_VS_TYPE_BSD
(
0x0002
,
"BSD"
),
///< BSD Partition table
TSK_VS_TYPE_SUN
(
0x0004
,
"SUN VTOC"
),
///< Sun VTOC
TSK_VS_TYPE_MAC
(
0x0008
,
"Mac"
),
///< Mac partition table
TSK_VS_TYPE_GPT
(
0x0010
,
"GPT"
),
///< GPT partition table
TSK_VS_TYPE_DBFILLER
(
0x00F0
,
"Fake"
),
///< fake partition table type for loaddb (for images that do not have a volume system)
TSK_VS_TYPE_UNSUPP
(
0xFFFF
,
"Unsupported"
);
///< Unsupported
private
long
vsType
;
private
TSK_VS_TYPE_ENUM
(
long
type
){
private
String
name
;
private
TSK_VS_TYPE_ENUM
(
long
type
,
String
name
){
this
.
vsType
=
type
;
this
.
name
=
name
;
}
public
static
TSK_VS_TYPE_ENUM
valueOf
(
long
vsType
)
{
for
(
TSK_VS_TYPE_ENUM
type
:
TSK_VS_TYPE_ENUM
.
values
())
{
if
(
type
.
getVsType
()
==
vsType
)
{
return
type
;
}
}
throw
new
IllegalArgumentException
(
"No TSK_VS_TYPE_ENUM of value: "
+
vsType
);
}
/**
...
...
@@ -521,6 +532,14 @@ private TSK_VS_TYPE_ENUM(long type){
public
long
getVsType
()
{
return
vsType
;
}
/**
* Get the name of the volume system type.
* @return
*/
public
String
getName
()
{
return
name
;
}
};
...
...
This diff is collapsed.
Click to expand it.
bindings/java/src/org/sleuthkit/datamodel/VolumeSystem.java
+
3
−
2
View file @
e26501e0
...
...
@@ -20,6 +20,7 @@
import
java.util.ArrayList
;
import
java.util.List
;
import
org.sleuthkit.datamodel.TskData.TSK_VS_TYPE_ENUM
;
/**
* Represents a volume system. Populated based on data in database.
...
...
@@ -66,8 +67,8 @@ public long getSize() {
*
* @return type
*/
public
long
getType
()
{
return
type
;
public
TSK_VS_TYPE_ENUM
getType
()
{
return
TskData
.
TSK_VS_TYPE_ENUM
.
valueOf
(
type
)
;
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment