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>
AFile
that 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 File
getRoot()
void
prepare(ImmutableStack<Object> indices)
Does nothing.void
setBytes(byte[] bytes)
Sets the bytes to be contained by thisFile
.void
write()
Creates aFile
with nameWritable.getName()
on disk and writes thebytes
of thisFile
into 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 aFile
with nameWritable.getName()
on disk and writes thebytes
of thisFile
into thatFile
.- Specified by:
write
in interfaceWritable<WritableOnDisk>
-
getRoot
protected File getRoot()
-
getBytes
public byte[] getBytes()
Description copied from interface:File
Returns the bytes contained by thisFile
.- Specified by:
getBytes
in interfaceFile<WritableOnDisk>
-
setBytes
public void setBytes(byte[] bytes)
Description copied from interface:File
Sets the bytes to be contained by thisFile
.- Specified by:
setBytes
in interfaceFile<WritableOnDisk>
-
prepare
public void prepare(ImmutableStack<Object> indices)
Does nothing.- Specified by:
prepare
in interfaceWritable<WritableOnDisk>
-
-