Package io
Class FullEncodingConverter
- java.lang.Object
-
- io.FullEncodingConverter
-
public class FullEncodingConverter extends java.lang.ObjectConvertsinput.txtfrom Cp1251 to Cp866 encoding and writes result to theoutput.txtfile.- Author:
- Georgiy Korneev
-
-
Constructor Summary
Constructors Constructor Description FullEncodingConverter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidconvert(java.lang.String inputFilename, java.nio.charset.Charset inputCharset, java.lang.String outputFilename, java.nio.charset.Charset outputCharset)Converts file to different encoding.static voidmain(java.lang.String[] args)Convertsinput.txtfrom Cp1251 to Cp866 encoding and writes result to theoutput.txtfile.
-
-
-
Method Detail
-
convert
public static void convert(java.lang.String inputFilename, java.nio.charset.Charset inputCharset, java.lang.String outputFilename, java.nio.charset.Charset outputCharset) throws java.io.IOExceptionConverts file to different encoding.- Parameters:
inputFilename- name of the file to convert.inputCharset- charset of the file to convert.outputFilename- name of the file to save result to.outputCharset- charset of the result file.- Throws:
java.io.IOException- if an I/O error occurred.
-
main
public static void main(java.lang.String[] args)
Convertsinput.txtfrom Cp1251 to Cp866 encoding and writes result to theoutput.txtfile.- Parameters:
args- ignored.
-
-