Class LanguageProfileWriter
java.lang.Object
com.optimaize.langdetect.profiles.LanguageProfileWriter
Writes a
LanguageProfile to an output stream or file.
All file operations are done with UTF-8.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidwrite(@NotNull LanguageProfile languageProfile, @NotNull OutputStream outputStream) Writes aLanguageProfileto an OutputStream in UTF-8.voidwriteToDirectory(@NotNull LanguageProfile languageProfile, @NotNull File fullPath) Writes aLanguageProfileto a folder using the language name as the file name.
-
Constructor Details
-
LanguageProfileWriter
public LanguageProfileWriter()
-
-
Method Details
-
write
public void write(@NotNull @NotNull LanguageProfile languageProfile, @NotNull @NotNull OutputStream outputStream) throws IOException Writes aLanguageProfileto an OutputStream in UTF-8.- Throws:
IOException
-
writeToDirectory
public void writeToDirectory(@NotNull @NotNull LanguageProfile languageProfile, @NotNull @NotNull File fullPath) throws IOException Writes aLanguageProfileto a folder using the language name as the file name.- Parameters:
fullPath- Must be an existing writable directory path.- Throws:
IOException- if such a file name exists already.
-