Questions tagged [bean-io]

BeanIO is an open source Java framework for marshalling and unmarshalling Java beans, or plain old java objects (POJOs), from large flat files or streams.

Documentation at https://beanio.github.io/

134 questions
1
vote
1 answer

BeanIO fixed length file writer Scala- Avoid one field from writing

I am trying to write a csv file from scala case class using fixed length file BeanIO library. sample code case class employee(id:String,name:String,dob:String)
1
vote
1 answer
1
vote
1 answer

How to create delimited file using BeanWriter

I am able to create file but the output file is not containing the delimiter , It is having fixedlength delimiter. How do I make it use my delimiter provided in beanio json Below is the Code which I have tried for writing the file but it does not…
Muddassir Rahman
  • 976
  • 1
  • 9
  • 20
1
vote
1 answer

write a header so that segment default name is also printed on the basis of max occurrence

Right now, I am able to write the header but not able to print the header name which is inside the segment is there any way to do that? input file- 1john dew BA xxx 1sam hart MA yyy It is not printing a default name inside segment. output…
Vishal
  • 75
  • 7
1
vote
1 answer

how to write fixedlength file to CSV file with bean io with all values come in diffent columns of a record

This code is able to write data to csv file but the only problem is the data is getting written in single column only. I want the data to come in different column. I am new to bean io and not able to figure it out. I have tried below given code and…
1
vote
1 answer

Fixed length file format

I am reading data from fixed length file. This is file content: Joe Smith Developer 075000 10012009 This is the mapping file:
s.k Syed
  • 31
  • 3
1
vote
1 answer

Writing Flat file using beanio (beanio.org) . pojo's have parent class

I need to sort pojo of different data type like Student,employee,patient using age and store it into array. Then write it to flat file using beanio. By json i am sending request which can have array of student,employee and patient .I have 3 pojo at…
Monu
  • 21
  • 3
1
vote
1 answer

How to get the value of an enum using @Field from beanio

I have the mapping: @Field(at = 123, length = 2, required = true) private AccountStatus accountStatus; And the Enum public enum AccountStatus…
user2919910
  • 575
  • 1
  • 7
  • 17
1
vote
1 answer

How to configure beanio to ignore certain chars in a flat file

I am currently working on a legacy application that gets its data via flat files. To read and write flat files beanio is used and the records are defined via annotations. My Problem is that the specification of one of the flat files demands that…
Tobias Nolte
  • 103
  • 2
  • 12
1
vote
1 answer

Hibernate-Validator 6.0.3Final compatible spring version

We are using hibernate validator version 5.1.3.Final with spring version 4.1.6.RELEASE to validate the input data along with bean-io framework. Now we are planning to upgrade the hibernate validator to latest version to improve the performance of…
Chethan G B
  • 27
  • 10
1
vote
2 answers

Unmarshal InputStream using BeanIO and Apache Camel

I have a service that receives a file and send it to a Camel route. On that route, I’d like to unmarshal that file using BeanIO, but it doesn’t recognize inputs of type InputStream. @RestController @RequestMapping(value = "/file") public class…
Marcos Tanaka
  • 3,112
  • 3
  • 25
  • 41
1
vote
1 answer

Force CRLF on BeanIo Export

I want to force BeanIO to use CRLF as terminator when exporting a fixed-length stream. The following does not work
usr-local-ΕΨΗΕΛΩΝ
  • 26,101
  • 30
  • 154
  • 305
1
vote
1 answer

BeanIo can't read special caracters

I have a .txt file with ANSI (windows-1252) Encoding i'am able to read it on windows but not on unix. here is the xml mapping file :
1
vote
1 answer

How to use multiple @Field on the same value with beanio?

I'm using org.beanio to parse fixed-length records. Unfortunately, there are price values where the integer and fractional part of the price is distributed to different locations. Question: is it possible to define two @Fields to one single value,…
membersound
  • 81,582
  • 193
  • 585
  • 1,120
1
vote
1 answer

Conditional validation of format or required property in Beanio

I have a requirement to conditionally validate the format or required=true/false based another fields in a beanmapper configuration. Example:
1
2
3
8 9