uk.ac.starlink.fits
Interface CopyableRandomAccess

All Superinterfaces:
nom.tam.util.ArrayDataInput, DataInput, nom.tam.util.RandomAccess
All Known Implementing Classes:
MappedFile, MultiMappedFile

public interface CopyableRandomAccess
extends nom.tam.util.RandomAccess

RandomAccess subinterface to describe an object which can copy itself. The copy is backed by the same data, but has a separate file pointer, so the two objects can be accessed without mutual interference.

Since:
20 Aug 2010

Method Summary
 CopyableRandomAccess copyAccess()
          Returns a new copy of this object.
 
Methods inherited from interface nom.tam.util.RandomAccess
getFilePointer, seek
 
Methods inherited from interface nom.tam.util.ArrayDataInput
close, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, read, readArray, skip
 
Methods inherited from interface java.io.DataInput
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes
 

Method Detail

copyAccess

CopyableRandomAccess copyAccess()
                                throws IOException
Returns a new copy of this object. The copy has the same data but an independent file pointer, facilitating (for instance) data access from multiple threads. The initial value of the copy's file pointer is the same as the current file pointer of the original.

Returns:
new copy
Throws:
IOException

Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved.