Documentation of 'org.hsqldb.cmdline.sqltool.FileRecordReader' Java class
FileRecordReader
org.hsqldb.cmdline.sqltool

Class FileRecordReader



  • public class FileRecordReader
    extends java.lang.Object
    This class does not impement or extend java.io classes/interfaces, and is not a Reader in the sense of java.io.Reader. It is a 'reader' in the sense that it provides a method that reads and return records from a text file. The unique use case here is that records are delimited with a regular expression pattern yet the file contents are read incrementally to minimize RAM usage.
    • Constructor Summary

      Constructors 
      Constructor and Description
      FileRecordReader(java.lang.String filePath, java.lang.String recordDelimiterRegex, java.lang.String encoding) 
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void close()
      Free up resources and close all potentially open I/O streams.
      java.lang.String getAbsolutePath() 
      java.lang.String getName() 
      java.lang.String getPath() 
      boolean isOpen() 
      static void main(java.lang.String[] sa)
      To be replaced by proper unit test class
      java.lang.String nextRecord() 
      • Methods inherited from class java.lang.Object

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

      • INITIAL_CHARBUFFER_SIZE

        public static final int INITIAL_CHARBUFFER_SIZE
        See Also:
        Constant Field Values
    • Constructor Detail

      • FileRecordReader

        public FileRecordReader(java.lang.String filePath,
                                java.lang.String recordDelimiterRegex,
                                java.lang.String encoding)
                         throws java.io.FileNotFoundException,
                                java.io.UnsupportedEncodingException
        Throws:
        java.util.regex.PatternSyntaxException
        java.io.UnsupportedEncodingException
        java.io.FileNotFoundException
    • Method Detail

      • close

        public void close()
                   throws java.io.IOException
        Free up resources and close all potentially open I/O streams.
        Throws:
        java.io.IOException
      • getName

        public java.lang.String getName()
      • getPath

        public java.lang.String getPath()
      • getAbsolutePath

        public java.lang.String getAbsolutePath()
      • isOpen

        public boolean isOpen()
      • main

        public static void main(java.lang.String[] sa)
                         throws java.io.IOException
        To be replaced by proper unit test class
        Throws:
        java.io.IOException
      • nextRecord

        public java.lang.String nextRecord()
                                    throws java.io.IOException
        Returns:
        null if no more records in input file
        Throws:
        java.io.IOException

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.