Package io

Class FullEncodingConverter


  • public class FullEncodingConverter
    extends java.lang.Object
    Converts input.txt from Cp1251 to Cp866 encoding and writes result to the output.txt file.
    Author:
    Georgiy Korneev
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void convert​(java.lang.String inputFilename, java.nio.charset.Charset inputCharset, java.lang.String outputFilename, java.nio.charset.Charset outputCharset)
      Converts file to different encoding.
      static void main​(java.lang.String[] args)
      Converts input.txt from Cp1251 to Cp866 encoding and writes result to the output.txt file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FullEncodingConverter

        public FullEncodingConverter()
    • 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.IOException
        Converts 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)
        Converts input.txt from Cp1251 to Cp866 encoding and writes result to the output.txt file.
        Parameters:
        args - ignored.