Class FileEntrySource

java.lang.Object
org.applecommander.source.FileEntrySource
All Implemented Interfaces:
CapabilityProvider, HintProvider, Source, Container, InformationProvider

public class FileEntrySource extends Object implements Source
  • Constructor Details

    • FileEntrySource

      public FileEntrySource(FileEntry fileEntry, Hint... hints)
  • Method Details

    • can

      public boolean can(Capability capability)
      Description copied from interface: CapabilityProvider
      Helps identify capabilities of the existing component.
      Specified by:
      can in interface CapabilityProvider
    • get

      public <T> Optional<T> get(Class<T> iface)
      Specified by:
      get in interface Container
    • is

      public boolean is(Hint hint)
      Specified by:
      is in interface HintProvider
    • getSize

      public int getSize()
      Description copied from interface: Source
      Indicates the physical size of this image on disk.
      Specified by:
      getSize in interface Source
    • getName

      public String getName()
      Description copied from interface: Source
      The name of the source. It likely will be used in user interfaces. It could represent a file from the computer or even a file from a file store.
      Specified by:
      getName in interface Source
    • readAllBytes

      public DataBuffer readAllBytes()
      Description copied from interface: Source
      Read all bytes from this source.
      Specified by:
      readAllBytes in interface Source
    • readBytes

      public DataBuffer readBytes(int offset, int length)
      Description copied from interface: Source
      Read a range of bytes from this source.
      Specified by:
      readBytes in interface Source
    • writeBytes

      public void writeBytes(int offset, DataBuffer data)
      Description copied from interface: Source
      Write bytes to this source. Updates the changed status.
      Specified by:
      writeBytes in interface Source
    • replaceAllBytes

      public void replaceAllBytes(DataBuffer data)
      Description copied from interface: Source
      Replace ALL bytes in this Source.
      Specified by:
      replaceAllBytes in interface Source
    • hasChanged

      public boolean hasChanged()
      Description copied from interface: Source
      Indicates if this source has changed.
      Specified by:
      hasChanged in interface Source
    • hasChanged

      public void hasChanged(boolean hasChanged)
      Description copied from interface: Source
      Sets the changed indicator.
      Specified by:
      hasChanged in interface Source
    • information

      public List<InformationGroup> information()
      Specified by:
      information in interface InformationProvider