Thanks for the reply and sorry for the delay. Yes, @MertTheGreat is right, the String encoding leads me to an error. My solution was to use the raw data to process it and then write it to a file. Working with bytes in the raw data is easier than working with writing and then reading the file.