Class FileOnDisk
- java.lang.Object
-
- app.coronawarn.server.services.distribution.assembly.structure.WritableOnDisk
-
- app.coronawarn.server.services.distribution.assembly.structure.file.FileOnDisk
-
- All Implemented Interfaces:
File<WritableOnDisk>,Writable<WritableOnDisk>
- Direct Known Subclasses:
FileOnDiskWithChecksum
public class FileOnDisk extends WritableOnDisk implements File<WritableOnDisk>
AFilethat can be written to disk.
-
-
Constructor Summary
Constructors Constructor Description FileOnDisk(String name, byte[] bytes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getBytes()Returns the bytes contained by thisFile.protected FilegetRoot()voidprepare(ImmutableStack<Object> indices)Does nothing.voidsetBytes(byte[] bytes)Sets the bytes to be contained by thisFile.voidwrite()Creates aFilewith nameWritable.getName()on disk and writes thebytesof thisFileinto thatFile.-
Methods inherited from class app.coronawarn.server.services.distribution.assembly.structure.WritableOnDisk
getFileOnDisk, getName, getParent, isArchive, isDirectory, isFile, setParent
-
-
-
-
Constructor Detail
-
FileOnDisk
public FileOnDisk(String name, byte[] bytes)
-
-
Method Detail
-
write
public void write()
Creates aFilewith nameWritable.getName()on disk and writes thebytesof thisFileinto thatFile.- Specified by:
writein interfaceWritable<WritableOnDisk>
-
getRoot
protected File getRoot()
-
getBytes
public byte[] getBytes()
Description copied from interface:FileReturns the bytes contained by thisFile.- Specified by:
getBytesin interfaceFile<WritableOnDisk>
-
setBytes
public void setBytes(byte[] bytes)
Description copied from interface:FileSets the bytes to be contained by thisFile.- Specified by:
setBytesin interfaceFile<WritableOnDisk>
-
prepare
public void prepare(ImmutableStack<Object> indices)
Does nothing.- Specified by:
preparein interfaceWritable<WritableOnDisk>
-
-