Class TextListInStream
- java.lang.Object
-
- com._1c.g5.v8.dt.core.streams.impl.TextListInStream
-
- All Implemented Interfaces:
IListInStream
,AutoCloseable
public class TextListInStream extends Object implements IListInStream
implementation of reader structured streamIListInStream
. Reverse operation for writing structured streamTextListOutStream
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com._1c.g5.v8.dt.core.streams.IListInStream
IListInStream.ServiceByte
-
-
Field Summary
-
Fields inherited from interface com._1c.g5.v8.dt.core.streams.IListInStream
separators
-
-
Constructor Summary
Constructors Constructor Description TextListInStream(InputStreamReader stream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
close streamvoid
get(IFile file)
skip all ' ', '\n' and ',' then read.void
get(IFileEx file)
similar as"get(OutputStream file)"
void
get(IListStreamObject obj)
read object having special interfaceIListStreamObject
boolean
getBeginOfList()
reading begin of the list from streamBigDecimal
getBigDecimal()
skip all ' ', '\n' and ',' then readboolean
getBoolean()
skip all ' ', '\n' and ',' then readbyte[]
getBytes(int size)
skip all ' ', '\n' and ',' then readchar
getChar()
skip all ' ', '\n' and ',' then readchar[]
getChars(int size)
skip all ' ', '\n' and ',' then readboolean
getComma()
double
getDouble()
skip all ' ', '\n' and ',' then readboolean
getEndOfList()
reading end of the list from streamfloat
getFloat()
skip all ' ', '\n' and ',' then readint
getInt()
skip all ' ', '\n' and ',' then readlong
getLong()
skip all ' ', '\n' and ',' then readBufferCharReader
getReader()
String
getString()
skip all ' ', '\n' and ',' then readUUID
getUUID()
skip all ' ', '\n' and ',' then readboolean
isBeginOfList()
detect begin of the list from stream (begin of the list isn't read)boolean
isComma()
boolean
isEndOfList()
detect end of the list from stream (end of the list isn't read)void
skipAllChar(char ch)
skip allchar == ch
from the streamvoid
skipAllSpaces()
skip all spaces from the streamString
skipAndSaveListContent(boolean onlyText)
skip and save non-read items of listvoid
skipListContent()
skip non-read items of list
-
-
-
Constructor Detail
-
TextListInStream
public TextListInStream(InputStreamReader stream)
-
-
Method Detail
-
getReader
public BufferCharReader getReader()
-
skipAllSpaces
public void skipAllSpaces()
Description copied from interface:IListInStream
skip all spaces from the stream- Specified by:
skipAllSpaces
in interfaceIListInStream
-
skipAllChar
public void skipAllChar(char ch)
Description copied from interface:IListInStream
skip allchar == ch
from the stream- Specified by:
skipAllChar
in interfaceIListInStream
-
getComma
public boolean getComma()
- Specified by:
getComma
in interfaceIListInStream
- Returns:
- true, if comma was gotten
-
isComma
public boolean isComma()
- Specified by:
isComma
in interfaceIListInStream
- Returns:
- true, if comma was detect (comma isn't read)
-
getBeginOfList
public boolean getBeginOfList()
Description copied from interface:IListInStream
reading begin of the list from stream- Specified by:
getBeginOfList
in interfaceIListInStream
- Returns:
- true, if begin of the list is read
-
isBeginOfList
public boolean isBeginOfList()
Description copied from interface:IListInStream
detect begin of the list from stream (begin of the list isn't read)- Specified by:
isBeginOfList
in interfaceIListInStream
- Returns:
- true, if detected
-
getEndOfList
public boolean getEndOfList()
Description copied from interface:IListInStream
reading end of the list from stream- Specified by:
getEndOfList
in interfaceIListInStream
- Returns:
- true, if end of the list is read
-
isEndOfList
public boolean isEndOfList()
Description copied from interface:IListInStream
detect end of the list from stream (end of the list isn't read)- Specified by:
isEndOfList
in interfaceIListInStream
- Returns:
- true, if detected
-
skipListContent
public void skipListContent()
Description copied from interface:IListInStream
skip non-read items of list- Specified by:
skipListContent
in interfaceIListInStream
-
skipAndSaveListContent
public String skipAndSaveListContent(boolean onlyText)
Description copied from interface:IListInStream
skip and save non-read items of list- Specified by:
skipAndSaveListContent
in interfaceIListInStream
- Parameters:
onlyText
- whether need to save onlt text without innter bracers and line endings- Returns:
- saved items
-
getBoolean
public boolean getBoolean()
skip all ' ', '\n' and ',' then read- Specified by:
getBoolean
in interfaceIListInStream
- Returns:
- boolean
-
getInt
public int getInt()
skip all ' ', '\n' and ',' then read- Specified by:
getInt
in interfaceIListInStream
- Returns:
- int
-
getLong
public long getLong()
skip all ' ', '\n' and ',' then read- Specified by:
getLong
in interfaceIListInStream
- Returns:
- long
-
getFloat
public float getFloat()
skip all ' ', '\n' and ',' then read- Specified by:
getFloat
in interfaceIListInStream
- Returns:
- float
-
getDouble
public double getDouble()
skip all ' ', '\n' and ',' then read- Specified by:
getDouble
in interfaceIListInStream
- Returns:
- double
-
getChar
public char getChar()
skip all ' ', '\n' and ',' then read- Specified by:
getChar
in interfaceIListInStream
- Returns:
- char
-
getUUID
public UUID getUUID()
skip all ' ', '\n' and ',' then read- Specified by:
getUUID
in interfaceIListInStream
- Returns:
- UUID
-
getChars
public char[] getChars(int size)
skip all ' ', '\n' and ',' then read- Specified by:
getChars
in interfaceIListInStream
- Parameters:
size
- - number of chars for reading- Returns:
- char[]
-
getBytes
public byte[] getBytes(int size)
skip all ' ', '\n' and ',' then read- Specified by:
getBytes
in interfaceIListInStream
- Parameters:
size
- - number of bytes for reading- Returns:
- byte[]
-
getString
public String getString()
skip all ' ', '\n' and ',' then read- Specified by:
getString
in interfaceIListInStream
- Returns:
- String
-
getBigDecimal
public BigDecimal getBigDecimal()
skip all ' ', '\n' and ',' then read- Specified by:
getBigDecimal
in interfaceIListInStream
- Returns:
- BigDecimal
-
get
public void get(IListStreamObject obj)
Description copied from interface:IListInStream
read object having special interfaceIListStreamObject
- Specified by:
get
in interfaceIListInStream
-
get
public void get(IFile file)
skip all ' ', '\n' and ',' then read. Decode from base64 then write to file- Specified by:
get
in interfaceIListInStream
-
get
public void get(IFileEx file)
similar as"get(OutputStream file)"
- Specified by:
get
in interfaceIListInStream
-
close
public void close()
Description copied from interface:IListInStream
close stream- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceIListInStream
-
-