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 classSVNSpillBuffer.MemoryBlock
-
Field Summary
Fields Modifier and Type Field Description private SVNSpillBuffer.MemoryBlockavailableprivate intblockSizeprivate booleandeleteOnCloseprivate java.io.FiledirPathprivate java.io.FilefileNameprivate SVNSpillBuffer.MemoryBlockheadprivate longmaxSizeprivate longmemorySizeprivate SVNSpillBuffer.MemoryBlockoutForReadingprivate java.io.RandomAccessFilespillprivate booleanspillAllContentsprivate longspillSizeprivate longspillStartprivate SVNSpillBuffer.MemoryBlocktail
-
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 voidclose()SVNSpillBufferInputStreamcreateInputStream()intgetBlockSize()private SVNSpillBuffer.MemoryBlockgetBuffer()java.io.FilegetFileName()longgetMemorySize()longgetSize()java.io.RandomAccessFilegetSpill()private booleanmaybeSeek()SVNSpillBuffer.MemoryBlockread()private SVNSpillBuffer.MemoryBlockreadData()private voidreturnBuffer(SVNSpillBuffer.MemoryBlock block)voidwrite(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:
closein interfacejava.lang.AutoCloseable- Specified by:
closein 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)
-
-