Class Binary

    • Field Detail

      • CONSTANT_EMPTY

        public static final Binary CONSTANT_EMPTY
      • data

        private byte[] data
      • file

        private java.io.File file
    • Constructor Detail

      • Binary

        public Binary​(boolean modifiable)
        Creates a new empty binary representation.
        Parameters:
        modifiable - whether this representation shall be modifiable
      • Binary

        public Binary​(java.lang.String text,
                      boolean modifiable)
               throws VilException
        Creates a new binary representation from file.
        Parameters:
        text - the text to construct the representation from
        modifiable - whether this representation shall be modifiable
        Throws:
        VilException - in case that reading fails for some reason
      • Binary

        public Binary​(java.io.File file,
                      boolean modifiable)
               throws VilException
        Creates a new binary representation from file.
        Parameters:
        file - the file to be considered as input
        modifiable - whether this representation shall be modifiable
        Throws:
        VilException - in case that reading fails for some reason
    • Method Detail

      • artifactChanged

        public void artifactChanged​(java.lang.Object cause)
                             throws VilException
        Description copied from interface: IArtifactChangedListener
        Is called when the artifact was changed, e.g., to trigger a reanalysis of substructures.
        Specified by:
        artifactChanged in interface IArtifactChangedListener
        Parameters:
        cause - the cause for the change, e.g., an artifact representation
        Throws:
        VilException - in case that the required operations fail for some reason
      • write

        public void write​(java.io.OutputStream out)
                   throws java.io.IOException
        Writes the data to the given output stream.
        Parameters:
        out - the target output stream
        Throws:
        java.io.IOException - in case of I/O problems
      • getStringValue

        public java.lang.String getStringValue​(IStringValueProvider.StringComparator comparator)
        Description copied from interface: IStringValueProvider
        Returns the string value of this object.
        Specified by:
        getStringValue in interface IStringValueProvider
        Parameters:
        comparator - if the sequence of elements, e.g., in case of collections, shall be ordered according to the comparator, null if the original sequence shall be returned
        Returns:
        the string value