19 package org.sleuthkit.datamodel;
21 import java.util.List;
22 import java.util.logging.Level;
23 import java.util.logging.Logger;
31 private static final Logger logger = Logger.getLogger(
Pool.class.
getName());
32 private volatile long poolHandle = 0;
33 private final long type;
44 super(db, obj_id, name);
51 if (poolHandle == 0) {
55 return SleuthkitJNI.readPool(poolHandle, readBuffer, offset, len);
63 logger.log(Level.SEVERE,
"Error getting parent of pool with obj ID {0}",
getId());
88 if (poolHandle == 0) {
90 if (poolHandle == 0) {
92 if ((dataSource != null) && (dataSource instanceof
Image)) {
93 Image image = (Image) dataSource;
96 throw new TskCoreException(
"Data Source of pool is not an image");
101 return this.poolHandle;
110 private long getPoolOffset(Image image)
throws TskCoreException {
114 }
else if (this.
getParent() instanceof Volume) {
116 Volume parent = (Volume)this.
getParent();
117 return parent.getStart() * image.getSsize();
119 throw new TskCoreException(
"Pool with object ID " + this.
getId() +
" does not have Image or Volume parent");
127 @SuppressWarnings(
"deprecation")
139 return v.
visit(
this);
143 public <T> T accept(ContentVisitor<T> v) {
144 return v.visit(
this);
160 return super.toString(preserveState) +
"Pool [\t" +
"type " + type +
"]\t";
int read(byte[] readBuffer, long offset, long len)
String toString(boolean preserveState)
static TSK_POOL_TYPE_ENUM valueOf(long poolType)
SleuthkitCase getSleuthkitCase()
List< Content > getChildren()
TSK_POOL_TYPE_ENUM getType()
List< Long > getChildrenIds()
Pool(SleuthkitCase db, long obj_id, String name, long type)
synchronized long getImageHandle()