Methods Summary |
---|
public void | close()
try{
this_mon.enter();
close(true);
}finally{
this_mon.exit();
}
|
protected void | close(boolean explicit)
try{
this_mon.enter();
boolean was_open = isOpen();
try{
closeSupport( explicit );
}finally{
if ( was_open ){
releaseSlot();
}
}
}finally{
this_mon.exit();
}
|
public void | ensureOpen(java.lang.String reason)
try{
this_mon.enter();
if ( isOpen()){
usedSlot();
}else{
getSlot();
try{
super.ensureOpen( reason );
}finally{
if ( !isOpen()){
releaseSlot();
}
}
}
}finally{
this_mon.exit();
}
|
public long | getLength()
try{
this_mon.enter();
ensureOpen( "FMFileLimited:getLength" );
return( getLengthSupport());
}finally{
this_mon.exit();
}
|
protected void | getSlot()
getManager().getSlot(this);
|
public void | read(org.gudy.azureus2.core3.util.DirectByteBuffer buffer, long offset)
try{
this_mon.enter();
ensureOpen( "FMFileLimited:read" );
readSupport( buffer, offset );
}finally{
this_mon.exit();
}
|
public void | read(org.gudy.azureus2.core3.util.DirectByteBuffer[] buffers, long offset)
try{
this_mon.enter();
ensureOpen( "FMFileLimited:read" );
readSupport( buffers, offset );
}finally{
this_mon.exit();
}
|
protected void | releaseSlot()
getManager().releaseSlot(this);
|
public void | setAccessMode(int mode)
try{
this_mon.enter();
if ( mode != getAccessMode()){
close(false);
}
setAccessModeSupport( mode );
}finally{
this_mon.exit();
}
|
public void | setLength(long length)
try{
this_mon.enter();
ensureOpen( "FMFileLimited:setLength" );
setLengthSupport( length );
}finally{
this_mon.exit();
}
|
protected void | usedSlot()
getManager().usedSlot(this);
|
public void | write(org.gudy.azureus2.core3.util.DirectByteBuffer buffer, long position)
try{
this_mon.enter();
ensureOpen( "FMFileLimited:write" );
writeSupport( buffer, position );
}finally{
this_mon.exit();
}
|
public void | write(org.gudy.azureus2.core3.util.DirectByteBuffer[] buffers, long position)
try{
this_mon.enter();
ensureOpen( "FMFileLimited:write" );
writeSupport( buffers, position );
}finally{
this_mon.exit();
}
|