Package fr.gpmsi
Class PreambleRemovedReader
- java.lang.Object
-
- java.io.Reader
-
- java.io.FilterReader
-
- fr.gpmsi.PreambleRemovedReader
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Readable
public class PreambleRemovedReader extends FilterReader
Reader qui ne renvoie des données que après qu'une ligne vide a été rencontrée. Utile pour sauter les premières lignes d'un fichier csv, par exemple.
-
-
Field Summary
-
Fields inherited from class java.io.FilterReader
in
-
-
Constructor Summary
Constructors Constructor Description PreambleRemovedReader(Reader in)
Constructeur qui prend un Reader en entrée
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Fermeturevoid
mark(int readAheadLimit)
Non supporté, envoie une exceptionboolean
markSupported()
Officiellement nous ne supportons pas "mark"int
read()
int
read(char[] cbuf)
int
read(char[] cbuf, int off, int len)
boolean
ready()
void
reset()
Non supporté, envoie une exceptionlong
skip(long n)
-
Methods inherited from class java.io.Reader
nullReader, read, transferTo
-
-
-
-
Constructor Detail
-
PreambleRemovedReader
public PreambleRemovedReader(Reader in)
Constructeur qui prend un Reader en entrée- Parameters:
in
- le Reader
-
-
Method Detail
-
read
public int read() throws IOException
- Overrides:
read
in classFilterReader
- Throws:
IOException
-
read
public int read(char[] cbuf) throws IOException
- Overrides:
read
in classReader
- Throws:
IOException
-
read
public int read(char[] cbuf, int off, int len) throws IOException
- Overrides:
read
in classFilterReader
- Throws:
IOException
-
skip
public long skip(long n) throws IOException
- Overrides:
skip
in classFilterReader
- Throws:
IOException
-
ready
public boolean ready() throws IOException
- Overrides:
ready
in classFilterReader
- Throws:
IOException
-
markSupported
public boolean markSupported()
Officiellement nous ne supportons pas "mark"- Overrides:
markSupported
in classFilterReader
-
mark
public void mark(int readAheadLimit) throws IOException
Non supporté, envoie une exception- Overrides:
mark
in classFilterReader
- Throws:
IOException
- Envoyée systématiquement
-
reset
public void reset() throws IOException
Non supporté, envoie une exception- Overrides:
reset
in classFilterReader
- Throws:
IOException
- Envoyée systématiquement
-
close
public void close() throws IOException
Fermeture- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterReader
- Throws:
IOException
-
-