19 |
this.shared = shared; |
this.shared = shared; |
20 |
} |
} |
21 |
|
|
22 |
abstract boolean isValid(); |
public abstract boolean isValid(); |
23 |
abstract void release(); |
public abstract void release(); |
24 |
|
|
25 |
FileChannel channel() |
|
26 |
|
public FileChannel channel() |
27 |
{ |
{ |
28 |
return channel; |
return channel; |
29 |
} |
} |
30 |
boolean isShared() |
|
31 |
|
public boolean isShared() |
32 |
{ |
{ |
33 |
return shared; |
return shared; |
34 |
} |
} |
35 |
|
|
36 |
boolean overlaps(long position, long size) |
public boolean overlaps(long position, long size) |
37 |
{ |
{ |
38 |
if (position > this.position+this.size) |
if (position > this.position+this.size) |
39 |
return false; |
return false; |
43 |
|
|
44 |
return true; |
return true; |
45 |
} |
} |
46 |
long position() |
|
47 |
|
public long position() |
48 |
{ |
{ |
49 |
return position; |
return position; |
50 |
} |
} |
51 |
|
|
52 |
long size() |
public long size() |
53 |
{ |
{ |
54 |
return size; |
return size; |
55 |
} |
} |