Krishna C
Krishna C

Reputation: 23

XML reading in java returns illegal character in base64 decoding

When I am reading input from JMS Topic it is successful in creating document and reading tags from it. Same content when I read from File, its throwing illegal character exception.

byte[] decoded = Base64.getDecoder().decode(encoded);

Upvotes: 2

Views: 143

Answers (1)

Anand Varkey Philips
Anand Varkey Philips

Reputation: 2073

Try using,

encodedData.getMimeDecoder()

It will neglect invalid character like new line characters and process the input.

Upvotes: 1

Related Questions