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 classSVNFSFSPackedRevProps.Builderprivate static classSVNFSFSPackedRevProps.Entry
-
Field Summary
Fields Modifier and Type Field Description private byte[]cachedUncompressedByteArrayprivate java.util.List<SVNFSFSPackedRevProps.Entry>entriesprivate longfirstRevisionstatic intINT64_BUFFER_SIZE
-
Constructor Summary
Constructors Modifier Constructor Description privateSVNFSFSPackedRevProps(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.OutputStreamcompressLevelDefault(byte[] uncompressedData, java.io.OutputStream outputStream)protected static java.io.OutputStreamcompressLevelNone(byte[] uncompressedData, java.io.OutputStream outputStream)private static byte[]decompress(byte[] compressedData)static SVNFSFSPackedRevPropsfromCompressedByteArray(byte[] compressedData)static SVNFSFSPackedRevPropsfromPackFile(java.io.File file)private static SVNFSFSPackedRevPropsfromUncompressedByteArray(byte[] uncompressedData)longgetFirstRevision()longgetRevisionsCount()private longgetSerializedSize()private longgetTotalSize()private voidinvalidateCaches()private SVNPropertiesparseProperties(byte[] data, int offset, int length)SVNPropertiesparseProperties(long revision)private static longreadEncodedUncompressedSize(java.io.InputStream inputStream, int lengthRecordSize)private static longreadNumber(java.io.InputStream inputStream)private voidsetEntry(long revision, byte[] data)java.util.List<SVNFSFSPackedRevProps>setProperties(long revision, SVNProperties properties, long revPropPackSize)private byte[]toUncompressedByteArray()private static voidwriteBody(byte[] bytes, java.io.OutputStream outputStream)private java.io.OutputStreamwriteCompressedLevelDefault(java.io.OutputStream outputStream)private java.io.OutputStreamwriteCompressedLevelNone(java.io.OutputStream outputStream)private static voidwriteEncodedUnCompressedSize(int compressedSize, java.io.OutputStream outputStream)private voidwriteNumber(java.io.OutputStream outputStream, long number)voidwriteToFile(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()
-
-