Class GlossaryReaderTSV


  • public final class GlossaryReaderTSV
    extends java.lang.Object
    Reader for tab separated glossaries.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void append​(java.io.File file, GlossaryEntry newEntry)
      Appends entry to glossary file.
      static boolean createEmpty​(java.io.File file)
      Create a new empty TSV glossary file with a leading comment
      static java.lang.String getFileEncoding​(java.io.File file)  
      static java.lang.String getFileEncoding​(java.io.File file, java.lang.String defaultEncoding)  
      static java.util.List<GlossaryEntry> read​(java.io.File file, boolean priorityGlossary)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • createEmpty

        public static boolean createEmpty​(java.io.File file)
                                   throws java.io.IOException
        Create a new empty TSV glossary file with a leading comment
        Parameters:
        file -
        Returns:
        true if the file was created successfully
        Throws:
        java.io.IOException
      • getFileEncoding

        public static java.lang.String getFileEncoding​(java.io.File file)
                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • getFileEncoding

        public static java.lang.String getFileEncoding​(java.io.File file,
                                                       java.lang.String defaultEncoding)
                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • read

        public static java.util.List<GlossaryEntry> read​(java.io.File file,
                                                         boolean priorityGlossary)
                                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • append

        public static void append​(java.io.File file,
                                  GlossaryEntry newEntry)
                           throws java.io.IOException
        Appends entry to glossary file. If file does not exist yet, it will be created.
        Parameters:
        file - The file to (create and) append to
        newEntry - the entry to append.
        Throws:
        java.io.IOException