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
0
votes
1 answer

beanio - To read data in order (Segment - Inner Segment)

Code Snippet: Some sample content, * *
0
votes
2 answers

Flat file with delimited records

I was looking for a way to parse flat file that contains nested records. As an example I have file containig a line NAME,SURNAME,ADRESSLINE1|ADDRESSLINE2|ADDRESLINE3,PHONE1|PHONE2 In the end i would hope it to map to POJO class Record { String…
0
votes
1 answer

unmarshalling fixedlength utf-8 strings with beanio and camel

When there are no diacritic signs that are represented with two bytes, unmarshalling of a message is OK, otherwise it fails complaining about the length. I tried to converty body to type string and set charset utf-8
hdjur_jcv
  • 686
  • 1
  • 12
  • 30
0
votes
2 answers

segment terminator in BeanIO

I'm interested in the recordTerminator parser property of BeanIO. Does it apply to segments too, like "segmentTerminator"? Namely, I have a stream of fixedlength format, containing of a single record with repeatable segments, and all stream is a…
hdjur_jcv
  • 686
  • 1
  • 12
  • 30
0
votes
1 answer

BeanIO DoubleTypeHandler pattern

I am using this pattern: This converts a number to 10 decimal points. However, if…
saz
  • 291
  • 4
  • 16
0
votes
0 answers

BeanIO - lietral is coming as extra line

Please help me to remove unwanted extra lines for below part. Current Output: 001 Name1Str1 CA 1234 001 Name2Str2 IN 4321 005 30Manager Technology 005 50Lead Technology Java Code: ArrayList emps = new…
sunleo
  • 10,589
  • 35
  • 116
  • 196
0
votes
0 answers

BeanIO - How to set no space if segment object is null

Below current output is having totally 28 chars 1Tit FNameLName EOL 2Tit StrCA12345EOL Below expected output is having totally 18 chars 1Tit FNameLNameEOL 2Tit StrCA12345EOL I am trying to set no space if segment object is null…
sunleo
  • 10,589
  • 35
  • 116
  • 196
0
votes
2 answers

Multiple Objects parsing in single file using BeanIO

I have following 2 types of records in a file, I can parse this file using BeanIO for any one of the record type 1 or 2 but I could not do both of them in a single parsor.I don't know how to use both of my mappings in single records. Please give me…
sunleo
  • 10,589
  • 35
  • 116
  • 196
0
votes
2 answers

Flat file to json conversion using beanIo

I am trying to parse a fixedlength flat file using beanIo to json Code: import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import java.util.Map; import…
theGeek
  • 101
  • 9
0
votes
2 answers

BeanIO writes 0 instead of intended value

I have a fixed-length stream containing record counters Records starts with Z Characters 16+9 (human form) contain B record counter Characters 25+9 (human form) contain C record counter All numbers padded with 0 and aligned to the right Record ends…
usr-local-ΕΨΗΕΛΩΝ
  • 26,101
  • 30
  • 154
  • 305
0
votes
1 answer

BeanIO - how to write so user can download a file not saved to the server

To get a full idea, the project consists of a webpage with a download button that, when clicked, downloads a text file to the users computer. The webpage uses Javascript and PHP, which will call a Java AWS-Lambda function. The java grabs text from a…
rDev
  • 237
  • 2
  • 15
0
votes
1 answer

Unable to find BeanIO mapping file when uploading Lambda function

I have a java program that writes to a file using beanIO. The program runs fine on my local environment and acts as expected. I first wrote this program on my local environment, and then have been uploading it as an AWS Lambda function, so it was…
rDev
  • 237
  • 2
  • 15
0
votes
1 answer

How to convert 0 to null with BeanIO

My question is how to convert the Integer value 0 to null? Previously I used the Xmappr annotation and it worked good with this annotation: @Text Now I have to use BeanIO, so I tried: @Field(xmlType=XmlType.Text) and it's not working. The unit…
Ensz
  • 75
  • 4
0
votes
1 answer

Changing from Xmappr to BeanIO

When I want to specify the attribute for XML element in java class with Xmappr annotations, I use @Attribute annotation, e.g: exampleclass.java: @Attribute("Code") private String code; And it is mapping the attribute Code for Brand…
Ensz
  • 75
  • 4
0
votes
1 answer

beanio customhandler get value from different field

I have one beanio xml file, the record example is like this:
Alex
  • 35
  • 1
  • 8
1 2 3
8 9