19 package org.sleuthkit.datamodel;
 
   21 import java.util.ResourceBundle;
 
   22 import java.util.ArrayList;
 
   23 import java.util.List;
 
   37         private static ResourceBundle 
bundle = ResourceBundle.getBundle(
"org.sleuthkit.datamodel.Bundle");
 
   50         protected Volume(
SleuthkitCase db, 
long obj_id, 
long addr, 
long startSector, 
long lengthInSectors, 
long flags, String desc) {
 
   51                 super(db, obj_id, 
"vol" + Long.toString(addr)); 
 
   56                 if (!desc.equals(
"")) {
 
   59                         this.desc = bundle.getString(
"Volume.desc.text");
 
   68                                 throw new TskCoreException(bundle.getString(
"Volume.read.exception.msg1.text"));
 
   70                         VolumeSystem parentVs = (VolumeSystem) myParent;
 
   72                         if (volumeHandle == 0) {
 
   82                 if (volumeHandle != 0) {
 
   84                                 if (volumeHandle != 0) {
 
  103                 return lengthInSectors * 512;
 
  110                 if (!name.isEmpty()) {
 
  111                         uniquePath = 
"/vol_" + 
name; 
 
  115                 if (myParent != null) {
 
  193                         if (flag.getVsFlag() == vsFlag) {
 
  194                                 result = flag.toString();
 
  212                         if (flag.toString().equals(vsFlag)) {
 
  213                                 result = flag.getVsFlag();
 
  237                 if ((vsFlag & allocFlag) == allocFlag) {
 
  238                         result = bundle.getString(
"Volume.vsFlagToString.allocated");
 
  240                 if ((vsFlag & unallocFlag) == unallocFlag) {
 
  241                         result = bundle.getString(
"Volume.vsFlagToString.unallocated");
 
  250                 return v.
visit(
this);
 
  254         public <T> T accept(ContentVisitor<T> v) {
 
  255                 return v.visit(
this);
 
  276                 List<FileSystem> fileSystems = 
new ArrayList<FileSystem>();
 
  277                 for (
Content child : children) {
 
  279                                 fileSystems.add((FileSystem) child);
 
  288                 return super.toString(preserveState) + 
"Volume [\t" + 
"addr " + addr + 
"\t" + 
"desc " + desc + 
"\t" + 
"flags " + flags + 
"\t" + 
"length " + lengthInSectors + 
"\t" + 
"start " + startSector + 
"]\t"; 
 
TSK_VS_PART_FLAG_ALL
Show all sectors in the walk. 
 
synchronized Content getParent()
 
static long valueToVsFlag(String vsFlag)
 
TSK_VS_PART_FLAG_ALLOC
Sectors are allocated to a volume in the volume system. 
 
int read(byte[] buf, long offset, long len)
 
List< FileSystem > getFileSystems()
 
synchronized long getVolumeSystemHandle()
 
String toString(boolean preserveState)
 
TSK_VS_PART_FLAG_META
Sectors contain volume system metadata and could also be ALLOC or UNALLOC. 
 
static ResourceBundle bundle
 
Volume(SleuthkitCase db, long obj_id, long addr, long startSector, long lengthInSectors, long flags, String desc)
 
static int readVsPart(long volHandle, byte[] readBuffer, long offset, long len)
 
List< Long > getChildrenIds()
 
String getFlagsAsString()
 
static void closeVs(long vsHandle)
 
static String vsFlagToValue(long vsFlag)
 
List< Content > getChildren()
 
SleuthkitCase getSleuthkitCase()
 
volatile long volumeHandle
 
static long openVsPart(long vsHandle, long volId)
 
TSK_VS_PART_FLAG_UNALLOC
Sectors are not allocated to a volume. 
 
synchronized String getUniquePath()
 
static String vsFlagToString(long vsFlag)