Package org.syncany.database
Class FileContent
- java.lang.Object
-
- org.syncany.database.FileContent
-
public class FileContent extends java.lang.Object
A file content represents the content of a file. It contains a list of references toChunkEntrys, and identifies a content by its checksum.A file content is implicitly referenced by one or many
FileVersions through the checksum attribute. A file content always contains the full list of chunks it resembles. There are no deltas!Unlike the chunk list in a
MultiChunkEntry, the order of the chunks is very important, because a file can only be reconstructed if the order of its chunks are followed.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFileContent.FileChecksum
-
Constructor Summary
Constructors Constructor Description FileContent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChunk(ChunkEntry.ChunkChecksum chunk)booleanequals(java.lang.Object obj)FileContent.FileChecksumgetChecksum()java.util.List<ChunkEntry.ChunkChecksum>getChunks()longgetSize()inthashCode()voidsetChecksum(FileContent.FileChecksum checksum)voidsetSize(long contentSize)java.lang.StringtoString()
-
-
-
Constructor Detail
-
FileContent
public FileContent()
-
-
Method Detail
-
addChunk
public void addChunk(ChunkEntry.ChunkChecksum chunk)
-
getChecksum
public FileContent.FileChecksum getChecksum()
-
setChecksum
public void setChecksum(FileContent.FileChecksum checksum)
-
getSize
public long getSize()
-
setSize
public void setSize(long contentSize)
-
getChunks
public java.util.List<ChunkEntry.ChunkChecksum> getChunks()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-