Class SVNSpillBuffer
- java.lang.Object
-
- org.tmatesoft.svn.core.internal.util.SVNSpillBuffer
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class SVNSpillBuffer extends java.lang.Object implements java.io.Closeable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
SVNSpillBuffer.MemoryBlock
-
Field Summary
Fields Modifier and Type Field Description private SVNSpillBuffer.MemoryBlock
available
private int
blockSize
private boolean
deleteOnClose
private java.io.File
dirPath
private java.io.File
fileName
private SVNSpillBuffer.MemoryBlock
head
private long
maxSize
private long
memorySize
private SVNSpillBuffer.MemoryBlock
outForReading
private java.io.RandomAccessFile
spill
private boolean
spillAllContents
private long
spillSize
private long
spillStart
private SVNSpillBuffer.MemoryBlock
tail
-
Constructor Summary
Constructors Constructor Description SVNSpillBuffer(int blockSize, long maxSize)
SVNSpillBuffer(int blockSize, long maxSize, boolean deleteOnClose, boolean spillAllContents, java.io.File dirPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
SVNSpillBufferInputStream
createInputStream()
int
getBlockSize()
private SVNSpillBuffer.MemoryBlock
getBuffer()
java.io.File
getFileName()
long
getMemorySize()
long
getSize()
java.io.RandomAccessFile
getSpill()
private boolean
maybeSeek()
SVNSpillBuffer.MemoryBlock
read()
private SVNSpillBuffer.MemoryBlock
readData()
private void
returnBuffer(SVNSpillBuffer.MemoryBlock block)
void
write(byte[] data, int offset, int length)
-
-
-
Field Detail
-
blockSize
private final int blockSize
-
maxSize
private final long maxSize
-
deleteOnClose
private final boolean deleteOnClose
-
spillAllContents
private final boolean spillAllContents
-
dirPath
private final java.io.File dirPath
-
memorySize
private long memorySize
-
spillSize
private long spillSize
-
fileName
private java.io.File fileName
-
spill
private java.io.RandomAccessFile spill
-
head
private SVNSpillBuffer.MemoryBlock head
-
tail
private SVNSpillBuffer.MemoryBlock tail
-
outForReading
private SVNSpillBuffer.MemoryBlock outForReading
-
available
private SVNSpillBuffer.MemoryBlock available
-
spillStart
private long spillStart
-
-
Method Detail
-
getSize
public long getSize()
-
getMemorySize
public long getMemorySize()
-
getFileName
public java.io.File getFileName()
-
getSpill
public java.io.RandomAccessFile getSpill()
-
getBlockSize
public int getBlockSize()
-
createInputStream
public SVNSpillBufferInputStream createInputStream()
-
write
public void write(byte[] data, int offset, int length) throws SVNException
- Throws:
SVNException
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
read
public SVNSpillBuffer.MemoryBlock read() throws java.io.IOException
- Throws:
java.io.IOException
-
maybeSeek
private boolean maybeSeek() throws java.io.IOException
- Throws:
java.io.IOException
-
readData
private SVNSpillBuffer.MemoryBlock readData() throws java.io.IOException
- Throws:
java.io.IOException
-
getBuffer
private SVNSpillBuffer.MemoryBlock getBuffer()
-
returnBuffer
private void returnBuffer(SVNSpillBuffer.MemoryBlock block)
-
-