Package org.apache.druid.data.input.impl
Class DelimitedBytes
- java.lang.Object
-
- org.apache.druid.data.input.impl.DelimitedBytes
-
public class DelimitedBytes extends Object
Utility function forDelimitedInputFormat
.
-
-
Field Summary
Fields Modifier and Type Field Description static int
UNKNOWN_FIELD_COUNT
Parameter forsplit(byte[], byte, int)
signifying that we do not know the expected number of fields.
-
Constructor Summary
Constructors Constructor Description DelimitedBytes()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<String>
split(byte[] bytes, byte delimiter, int numFieldsHint)
Split UTF-8 bytes by a particular delimiter.
-
-
-
Field Detail
-
UNKNOWN_FIELD_COUNT
public static final int UNKNOWN_FIELD_COUNT
Parameter forsplit(byte[], byte, int)
signifying that we do not know the expected number of fields.- See Also:
- Constant Field Values
-
-
Method Detail
-
split
public static List<String> split(byte[] bytes, byte delimiter, int numFieldsHint)
Split UTF-8 bytes by a particular delimiter. WhenNullHandling.sqlCompatible()
, empty parts are returned as nulls. WhenNullHandling.replaceWithDefault()
, empty parts are returned as empty strings.- Parameters:
bytes
- utf-8 bytesdelimiter
- the delimiternumFieldsHint
- expected number of fields, orUNKNOWN_FIELD_COUNT
-
-