Package net.sf.jasperreports.engine.util
Class JRConcurrentSwapFile
- java.lang.Object
-
- net.sf.jasperreports.engine.util.JRSwapFile
-
- net.sf.jasperreports.engine.util.JRConcurrentSwapFile
-
public class JRConcurrentSwapFile extends JRSwapFile
JRSwapFilederived class that uses aFileChannelto perform concurrent I/O on the swap file.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.sf.jasperreports.engine.util.JRSwapFile
JRSwapFile.LongQueue, JRSwapFile.SwapHandle
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringEXCEPTION_MESSAGE_KEY_INSUFFICIENT_DATA-
Fields inherited from class net.sf.jasperreports.engine.util.JRSwapFile
file, PROPERTY_DELETE_ON_EXIT, swapFile
-
-
Constructor Summary
Constructors Constructor Description JRConcurrentSwapFile(java.lang.String directory, int blockSize, int minGrowCount)Creates a swap file.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidread(byte[] data, int dataOffset, int dataLength, long fileOffset)java.lang.StringtoString()protected voidwrite(byte[] data, int dataSize, int dataOffset, long fileOffset)-
Methods inherited from class net.sf.jasperreports.engine.util.JRSwapFile
dispose, finalize, free, freeBlocks, read, reserveFreeBlocks, write
-
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_INSUFFICIENT_DATA
public static final java.lang.String EXCEPTION_MESSAGE_KEY_INSUFFICIENT_DATA
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JRConcurrentSwapFile
public JRConcurrentSwapFile(java.lang.String directory, int blockSize, int minGrowCount)Creates a swap file. The file name is generated automatically.- Parameters:
directory- the directory where the file should be created.blockSize- the size of the blocks allocated by the swap fileminGrowCount- the minimum number of blocks by which the swap file grows when full
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classJRSwapFile
-
write
protected void write(byte[] data, int dataSize, int dataOffset, long fileOffset) throws java.io.IOException- Overrides:
writein classJRSwapFile- Throws:
java.io.IOException
-
read
protected void read(byte[] data, int dataOffset, int dataLength, long fileOffset) throws java.io.IOException- Overrides:
readin classJRSwapFile- Throws:
java.io.IOException
-
-