47 |
public FileChannelImpl ch; |
public FileChannelImpl ch; |
48 |
public MappedShortFileBuffer(FileChannelImpl ch) |
public MappedShortFileBuffer(FileChannelImpl ch) |
49 |
{ |
{ |
50 |
|
// FIXME |
51 |
|
//super ((int) ch.size () / 2, (int) ch.size () / 2, 0, 0); |
52 |
|
super (0, 0, 0, 0); |
53 |
this.ch = ch; |
this.ch = ch; |
54 |
address = ch.address; |
address = ch.address; |
|
try { |
|
|
long si = ch.size() / 2; |
|
|
limit((int)si); |
|
|
} catch (IOException e) { |
|
|
System.err.println("failed to get size of file-channel's file"); |
|
|
} |
|
55 |
} |
} |
56 |
public MappedShortFileBuffer(MappedShortFileBuffer b) |
public MappedShortFileBuffer(MappedShortFileBuffer b) |
57 |
{ |
{ |
58 |
|
super (b.capacity (), b.limit (), b.position (), 0); |
59 |
this.ro = b.ro; |
this.ro = b.ro; |
60 |
this.ch = b.ch; |
this.ch = b.ch; |
61 |
address = b.address; |
address = b.address; |
|
limit(b.limit()); |
|
62 |
} |
} |
63 |
public boolean isReadOnly() |
public boolean isReadOnly() |
64 |
{ |
{ |