Class SmallFile


  • public class SmallFile
    extends java.lang.Object
    Author:
    Jorge Campins
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.nio.charset.Charset[] DEFAULT_CHARSETS  
      static java.nio.charset.Charset WINDOWS_CHARSET
      https://www.i18nqa.com/debug/table-iso8859-1-vs-windows-1252.html ISO-8859-1 (also called Latin-1) is identical to Windows-1252 (also called CP1252) except for the code points 128-159 (0x80-0x9F).
    • Constructor Summary

      Constructors 
      Constructor Description
      SmallFile​(java.lang.String path)  
      SmallFile​(java.lang.String path, java.nio.charset.Charset[] charsets)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.nio.charset.Charset getCharset()  
      java.nio.charset.Charset[] getCharsets()  
      java.lang.String getExtension()  
      java.util.List<java.lang.String> getLines()  
      java.lang.String getName()  
      java.nio.file.Path getPath()  
      boolean isEmpty()  
      boolean isNotEmpty()  
      java.util.List<java.lang.String> read()  
      • Methods inherited from class java.lang.Object

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

      • WINDOWS_CHARSET

        public static final java.nio.charset.Charset WINDOWS_CHARSET
        https://www.i18nqa.com/debug/table-iso8859-1-vs-windows-1252.html ISO-8859-1 (also called Latin-1) is identical to Windows-1252 (also called CP1252) except for the code points 128-159 (0x80-0x9F). ISO-8859-1 assigns several control codes in this range. Windows-1252 has several characters, punctuation, arithmetic and business symbols assigned to these code points. Mislabeling text encoded in Windows-1252 as ISO-8859-1 and then converting from ISO-8859-1 to Unicode or other encodings causes the characters in the range 128-159 to be lost. They are converted as if they were control codes and typically display as white space, a specialized question mark, or a square showing the 4 hex digits of the code point. Using an ISO-8859-1 font that does not have the correct glyphs for the Windows-1252 characters will cause the characters to be displayed incorrectly.
      • DEFAULT_CHARSETS

        public static final java.nio.charset.Charset[] DEFAULT_CHARSETS
    • Constructor Detail

      • SmallFile

        public SmallFile​(java.lang.String path)
      • SmallFile

        public SmallFile​(java.lang.String path,
                         java.nio.charset.Charset[] charsets)
    • Method Detail

      • read

        public java.util.List<java.lang.String> read()
      • getName

        public java.lang.String getName()
      • getExtension

        public java.lang.String getExtension()
      • getPath

        public java.nio.file.Path getPath()
      • getCharsets

        public java.nio.charset.Charset[] getCharsets()
      • getCharset

        public java.nio.charset.Charset getCharset()
      • getLines

        public java.util.List<java.lang.String> getLines()
      • isEmpty

        public boolean isEmpty()
      • isNotEmpty

        public boolean isNotEmpty()