Class CsvTokener

java.lang.Object
org.miaixz.bus.core.lang.wrapper.SimpleWrapper<Reader>
org.miaixz.bus.office.csv.CsvTokener
All Implemented Interfaces:
Closeable, AutoCloseable, org.miaixz.bus.core.lang.Wrapper<Reader>, org.miaixz.bus.core.Provider

public class CsvTokener extends org.miaixz.bus.core.lang.wrapper.SimpleWrapper<Reader> implements Closeable
CSV解析器,用于解析CSV文件
Since:
Java 17+
Author:
Kimi Liu
  • Field Summary

    Fields inherited from class org.miaixz.bus.core.lang.wrapper.SimpleWrapper

    raw
  • Constructor Summary

    Constructors
    Constructor
    Description
    构造
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    将标记回退到第一个字符
    void
     
    long
    获取当前位置
    int
    读取下一个字符,并记录位置

    Methods inherited from class org.miaixz.bus.core.lang.wrapper.SimpleWrapper

    getRaw

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.miaixz.bus.core.lang.Wrapper

    type
  • Constructor Details

    • CsvTokener

      public CsvTokener(Reader reader)
      构造
      Parameters:
      reader - Reader
  • Method Details

    • next

      public int next()
      读取下一个字符,并记录位置
      Returns:
      下一个字符
    • back

      public void back() throws IllegalStateException
      将标记回退到第一个字符
      Throws:
      IllegalStateException - 当多次调用back时,抛出此异常
    • getIndex

      public long getIndex()
      获取当前位置
      Returns:
      位置
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException