Class DG4File

    • Constructor Detail

      • DG4File

        public DG4File​(List<IrisInfo> irisInfos)
        Creates a new file with the specified records.
        Parameters:
        irisInfos - records
      • DG4File

        public DG4File​(List<IrisInfo> irisInfos,
                       boolean shouldAddRandomDataIfEmpty)
        Creates a new file with the specified records.
        Parameters:
        irisInfos - records
        shouldAddRandomDataIfEmpty - indicates whether the encoder should add random data when no templates are present
      • DG4File

        public DG4File​(InputStream inputStream)
                throws IOException
        Constructs a new file based on an input stream.
        Parameters:
        inputStream - an input stream
        Throws:
        IOException - on error reading from input stream
    • Method Detail

      • readContent

        protected void readContent​(InputStream inputStream)
                            throws IOException
        Description copied from class: AbstractTaggedLDSFile
        Reads the contents of the data group from an input stream. Client code implementing this method should only read the contents from the input stream, not the tag or length of the data group.
        Specified by:
        readContent in class AbstractTaggedLDSFile
        Parameters:
        inputStream - the input stream to read from
        Throws:
        IOException - on error reading from input stream
      • writeContent

        protected void writeContent​(OutputStream outputStream)
                             throws IOException
        Description copied from class: AbstractTaggedLDSFile
        Writes the contents of the data group to an output stream. Client code implementing this method should only write the contents to the output stream, not the tag or length of the data group.
        Specified by:
        writeContent in class AbstractTaggedLDSFile
        Parameters:
        outputStream - the output stream to write to
        Throws:
        IOException - on error writing to output stream
      • toString

        public String toString()
        Gets a textual representation of this file.
        Overrides:
        toString in class CBEFFDataGroup<IrisInfo>
        Returns:
        a textual representation of this file
      • getIrisInfos

        public List<IrisInfo> getIrisInfos()
        Gets the embedded iris infos in this file.
        Returns:
        iris infos
      • addIrisInfo

        public void addIrisInfo​(IrisInfo irisInfo)
        Adds an iris info to this file.
        Parameters:
        irisInfo - an iris info
      • removeIrisInfo

        public void removeIrisInfo​(int index)
        Removes an iris info from this file.
        Parameters:
        index - the index of the iris info to remove
      • getEncoded

        public byte[] getEncoded()
        Returns the contents of this file as byte array, includes the ICAO tag and length.
        Specified by:
        getEncoded in interface LDSElement
        Returns:
        a byte array containing the file