Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DelimitedLineTokenizer tab character

Tags:

java

tabs

How can I fix this problem:

<bean id=" productLineTokenizer" class="org.springframework.batch.item.file.transform.DelimitedLineTokenizer">
        <property name="delimiter" value="\t"/>

Caused by:

java.lang.IllegalArgumentException: 
String [\t] with length 2 cannot be converted to char type
like image 478
user1593053 Avatar asked Aug 12 '12 05:08

user1593053


1 Answers

You need to use a constant

<property name="delimiter">
    <util:constant static-field="org.springframework.batch.item.file.transform.DelimitedLineTokenizer.DELIMITER_TAB"/>
</property>
like image 195
cexbrayat Avatar answered Oct 05 '22 23:10

cexbrayat