Package org.omegat.gui.glossary
Class GlossaryReaderTSV
- java.lang.Object
-
- org.omegat.gui.glossary.GlossaryReaderTSV
-
public final class GlossaryReaderTSV extends java.lang.ObjectReader for tab separated glossaries.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidappend(java.io.File file, GlossaryEntry newEntry)Appends entry to glossary file.static booleancreateEmpty(java.io.File file)Create a new empty TSV glossary file with a leading commentstatic java.lang.StringgetFileEncoding(java.io.File file)static java.lang.StringgetFileEncoding(java.io.File file, java.lang.String defaultEncoding)static java.util.List<GlossaryEntry>read(java.io.File file, boolean priorityGlossary)
-
-
-
Method Detail
-
createEmpty
public static boolean createEmpty(java.io.File file) throws java.io.IOExceptionCreate 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.IOExceptionAppends entry to glossary file. If file does not exist yet, it will be created.- Parameters:
file- The file to (create and) append tonewEntry- the entry to append.- Throws:
java.io.IOException
-
-