Class SVNFSFSPackedRevProps
- java.lang.Object
-
- org.tmatesoft.svn.core.internal.io.fs.revprop.SVNFSFSPackedRevProps
-
public class SVNFSFSPackedRevProps extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SVNFSFSPackedRevProps.Builder
private static class
SVNFSFSPackedRevProps.Entry
-
Field Summary
Fields Modifier and Type Field Description private byte[]
cachedUncompressedByteArray
private java.util.List<SVNFSFSPackedRevProps.Entry>
entries
private long
firstRevision
static int
INT64_BUFFER_SIZE
-
Constructor Summary
Constructors Modifier Constructor Description private
SVNFSFSPackedRevProps(long firstRevision, java.util.List<SVNFSFSPackedRevProps.Entry> entries, byte[] cachedUncompressedByteArray)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static byte[]
arrayCopyOfRange(byte[] bytes, int offset, int length)
byte[]
asCompressedLevelNoneByteArray()
private byte[]
asUncompressedByteArray()
private static byte[]
composePropertiesByteArray(SVNProperties properties)
private java.io.OutputStream
compressLevelDefault(byte[] uncompressedData, java.io.OutputStream outputStream)
protected static java.io.OutputStream
compressLevelNone(byte[] uncompressedData, java.io.OutputStream outputStream)
private static byte[]
decompress(byte[] compressedData)
static SVNFSFSPackedRevProps
fromCompressedByteArray(byte[] compressedData)
static SVNFSFSPackedRevProps
fromPackFile(java.io.File file)
private static SVNFSFSPackedRevProps
fromUncompressedByteArray(byte[] uncompressedData)
long
getFirstRevision()
long
getRevisionsCount()
private long
getSerializedSize()
private long
getTotalSize()
private void
invalidateCaches()
private SVNProperties
parseProperties(byte[] data, int offset, int length)
SVNProperties
parseProperties(long revision)
private static long
readEncodedUncompressedSize(java.io.InputStream inputStream, int lengthRecordSize)
private static long
readNumber(java.io.InputStream inputStream)
private void
setEntry(long revision, byte[] data)
java.util.List<SVNFSFSPackedRevProps>
setProperties(long revision, SVNProperties properties, long revPropPackSize)
private byte[]
toUncompressedByteArray()
private static void
writeBody(byte[] bytes, java.io.OutputStream outputStream)
private java.io.OutputStream
writeCompressedLevelDefault(java.io.OutputStream outputStream)
private java.io.OutputStream
writeCompressedLevelNone(java.io.OutputStream outputStream)
private static void
writeEncodedUnCompressedSize(int compressedSize, java.io.OutputStream outputStream)
private void
writeNumber(java.io.OutputStream outputStream, long number)
void
writeToFile(java.io.File packFile, boolean compress)
-
-
-
Field Detail
-
INT64_BUFFER_SIZE
public static final int INT64_BUFFER_SIZE
- See Also:
- Constant Field Values
-
firstRevision
private final long firstRevision
-
entries
private final java.util.List<SVNFSFSPackedRevProps.Entry> entries
-
cachedUncompressedByteArray
private byte[] cachedUncompressedByteArray
-
-
Constructor Detail
-
SVNFSFSPackedRevProps
private SVNFSFSPackedRevProps(long firstRevision, java.util.List<SVNFSFSPackedRevProps.Entry> entries, byte[] cachedUncompressedByteArray)
-
-
Method Detail
-
fromPackFile
public static SVNFSFSPackedRevProps fromPackFile(java.io.File file) throws SVNException
- Throws:
SVNException
-
fromCompressedByteArray
public static SVNFSFSPackedRevProps fromCompressedByteArray(byte[] compressedData) throws SVNException
- Throws:
SVNException
-
fromUncompressedByteArray
private static SVNFSFSPackedRevProps fromUncompressedByteArray(byte[] uncompressedData) throws SVNException
- Throws:
SVNException
-
getFirstRevision
public long getFirstRevision()
-
getRevisionsCount
public long getRevisionsCount()
-
asCompressedLevelNoneByteArray
public byte[] asCompressedLevelNoneByteArray() throws SVNException
- Throws:
SVNException
-
writeToFile
public void writeToFile(java.io.File packFile, boolean compress) throws SVNException
- Throws:
SVNException
-
writeCompressedLevelDefault
private java.io.OutputStream writeCompressedLevelDefault(java.io.OutputStream outputStream) throws SVNException
- Throws:
SVNException
-
writeCompressedLevelNone
private java.io.OutputStream writeCompressedLevelNone(java.io.OutputStream outputStream) throws SVNException
- Throws:
SVNException
-
parseProperties
public SVNProperties parseProperties(long revision) throws SVNException
- Throws:
SVNException
-
getTotalSize
private long getTotalSize()
-
getSerializedSize
private long getSerializedSize() throws SVNException
- Throws:
SVNException
-
setProperties
public java.util.List<SVNFSFSPackedRevProps> setProperties(long revision, SVNProperties properties, long revPropPackSize) throws SVNException
- Throws:
SVNException
-
decompress
private static byte[] decompress(byte[] compressedData) throws SVNException
- Throws:
SVNException
-
arrayCopyOfRange
private static byte[] arrayCopyOfRange(byte[] bytes, int offset, int length)
-
compressLevelNone
protected static java.io.OutputStream compressLevelNone(byte[] uncompressedData, java.io.OutputStream outputStream) throws SVNException
- Throws:
SVNException
-
compressLevelDefault
private java.io.OutputStream compressLevelDefault(byte[] uncompressedData, java.io.OutputStream outputStream) throws SVNException
- Throws:
SVNException
-
writeBody
private static void writeBody(byte[] bytes, java.io.OutputStream outputStream) throws SVNException
- Throws:
SVNException
-
writeEncodedUnCompressedSize
private static void writeEncodedUnCompressedSize(int compressedSize, java.io.OutputStream outputStream) throws SVNException
- Throws:
SVNException
-
readEncodedUncompressedSize
private static long readEncodedUncompressedSize(java.io.InputStream inputStream, int lengthRecordSize) throws SVNException
- Throws:
SVNException
-
asUncompressedByteArray
private byte[] asUncompressedByteArray() throws SVNException
- Throws:
SVNException
-
parseProperties
private SVNProperties parseProperties(byte[] data, int offset, int length) throws SVNException
- Throws:
SVNException
-
composePropertiesByteArray
private static byte[] composePropertiesByteArray(SVNProperties properties) throws SVNException
- Throws:
SVNException
-
toUncompressedByteArray
private byte[] toUncompressedByteArray() throws SVNException
- Throws:
SVNException
-
writeNumber
private void writeNumber(java.io.OutputStream outputStream, long number) throws SVNException
- Throws:
SVNException
-
readNumber
private static long readNumber(java.io.InputStream inputStream) throws SVNException
- Throws:
SVNException
-
setEntry
private void setEntry(long revision, byte[] data)
-
invalidateCaches
private void invalidateCaches()
-
-