|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.sqoop.lib.DelimiterSet
public class DelimiterSet
Encapsulates a set of delimiters used to encode a record.
Field Summary | |
---|---|
static char |
NULL_CHAR
|
Constructor Summary | |
---|---|
DelimiterSet()
Create a delimiter set with the default delimiters (comma for fields, newline for records). |
|
DelimiterSet(char field,
char record,
char enclose,
char escape,
boolean isEncloseRequired)
Create a delimiter set with the specified delimiters. |
Method Summary | |
---|---|
java.lang.Object |
clone()
|
DelimiterSet |
copy()
Identical to clone() but does not throw spurious exceptions. |
boolean |
equals(java.lang.Object other)
|
java.lang.String |
formatConstructor()
Format this set of delimiters as a call to the constructor for this object, that would generate identical delimiters. |
char |
getEnclosedBy()
|
char |
getEscapedBy()
|
char |
getFieldsTerminatedBy()
|
char |
getLinesTerminatedBy()
|
int |
hashCode()
|
boolean |
isEncloseRequired()
|
void |
setEnclosedBy(char e)
Sets the enclosed-by character. |
void |
setEncloseRequired(boolean required)
Set whether the enclosed-by character must be applied to all fields, or only fields with embedded delimiters. |
void |
setEscapedBy(char e)
Sets the escaped-by character. |
void |
setFieldsTerminatedBy(char f)
Sets the fields-terminated-by character. |
void |
setLinesTerminatedBy(char r)
Sets the end-of-record lines-terminated-by character. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final char NULL_CHAR
Constructor Detail |
---|
public DelimiterSet()
public DelimiterSet(char field, char record, char enclose, char escape, boolean isEncloseRequired)
field
- the fields-terminated-by delimiterrecord
- the lines-terminated-by delimiterenclose
- the enclosed-by characterescape
- the escaped-by characterisEncloseRequired
- If true, enclosed-by is applied to all
fields. If false, only applied to fields that embed delimiters.Method Detail |
---|
public DelimiterSet copy()
public void setFieldsTerminatedBy(char f)
public char getFieldsTerminatedBy()
public void setLinesTerminatedBy(char r)
public char getLinesTerminatedBy()
public void setEnclosedBy(char e)
e
- the enclosed-by character, or '\000' for no enclosing character.public char getEnclosedBy()
public void setEscapedBy(char e)
e
- the escaped-by character, or '\000' for no escape character.public char getEscapedBy()
public void setEncloseRequired(boolean required)
public boolean isEncloseRequired()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String formatConstructor()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |