okaywit / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

Fixed length format-Using Splitter #1217

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am having a Flat file,I am using guava splitter to split the lines,I need to 
store a fixed length file(of length 650) into one array and other so on while 
reading Flat File,The real issue is line should be read including 
whitespaces,Any solutions?

The snippet is given below:
Iterable<String> splitStrings = Splitter.fixedLength(640).split(line);

Original issue reported on code.google.com by prabhath...@gmail.com on 29 Nov 2012 at 11:31

GoogleCodeExporter commented 9 years ago
As explained on http://guava-libraries.googlecode.com, please post requests for 
help like this to Stack Overflow.

It's still often us who answer the question, but the information is then 
archived in the right place. And very often a user beats us to it or does a 
better job than we would have.

Original comment by kevinb@google.com on 29 Nov 2012 at 2:44

GoogleCodeExporter commented 9 years ago
@Op If you have a look at Spring Batch, it's FlatFileItemReader could be what 
you need: 
http://static.springsource.org/spring-batch/reference/html/readersAndWriters.htm
l#flatFileItemReader

Original comment by SeanPFl...@googlemail.com on 3 Dec 2012 at 9:25

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:13

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:08