19 package org.sleuthkit.datamodel;
 
   21 import java.util.ResourceBundle;
 
   22 import java.util.ArrayList;
 
   23 import java.util.List;
 
   32         private long startSector; 
 
   33         private long lengthInSectors; 
 
   36         private volatile long volumeHandle = 0;
 
   37         private String uniquePath;
 
   38         private static ResourceBundle bundle = ResourceBundle.getBundle(
"org.sleuthkit.datamodel.Bundle");
 
   51         protected Volume(
SleuthkitCase db, 
long obj_id, 
long addr, 
long startSector, 
long lengthInSectors, 
long flags, String desc) {
 
   52                 super(db, obj_id, 
"vol" + Long.toString(addr)); 
 
   54                 this.startSector = startSector;
 
   55                 this.lengthInSectors = lengthInSectors;
 
   56                 this.uniquePath = null;
 
   58                 if (!desc.equals(
"")) {
 
   61                         this.desc = bundle.getString(
"Volume.desc.text");
 
   70                                 throw new TskCoreException(bundle.getString(
"Volume.read.exception.msg1.text"));
 
   72                         VolumeSystem parentVs = (VolumeSystem) myParent;
 
   80                         if (volumeHandle == 0) {
 
  106                 return lengthInSectors * 512;
 
  111                 if(uniquePath == null) {
 
  114                         if (!name.isEmpty()) {
 
  115                                 uniquePath = 
"/vol_" + name; 
 
  119                         if (myParent != null) {
 
  154                 return lengthInSectors;
 
  198                         if (flag.getVsFlag() == vsFlag) {
 
  199                                 result = flag.toString();
 
  217                         if (flag.toString().equals(vsFlag)) {
 
  218                                 result = flag.getVsFlag();
 
  242                 if ((vsFlag & allocFlag) == allocFlag) {
 
  243                         result = bundle.getString(
"Volume.vsFlagToString.allocated");
 
  245                 if ((vsFlag & unallocFlag) == unallocFlag) {
 
  246                         result = bundle.getString(
"Volume.vsFlagToString.unallocated");
 
  255                 return v.
visit(
this);
 
  259         public <T> T accept(ContentVisitor<T> v) {
 
  260                 return v.visit(
this);
 
  281                 List<FileSystem> fileSystems = 
new ArrayList<FileSystem>();
 
  282                 for (
Content child : children) {
 
  284                                 fileSystems.add((FileSystem) child);
 
  293                 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()
 
TSK_VS_TYPE_APFS
APFS pool NON-NLS. 
 
synchronized long getVolumeSystemHandle()
 
String toString(boolean preserveState)
 
TSK_VS_PART_FLAG_META
Sectors contain volume system metadata and could also be ALLOC or UNALLOC. 
 
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 String vsFlagToValue(long vsFlag)
 
List< Content > getChildren()
 
SleuthkitCase getSleuthkitCase()
 
static long openVsPart(long vsHandle, long volId)
 
TSK_VS_PART_FLAG_UNALLOC
Sectors are not allocated to a volume. 
 
synchronized String getUniquePath()
 
TSK_VS_TYPE_ENUM getType()
 
static String vsFlagToString(long vsFlag)