Until now I passed unmodified blob data as an InputStream
:
public InputStream getData(Blob blob) {
return blob.getData().getBinaryStream();
}
Now I want to pass a modified stream with following characteristics:
- Add additional content from iterators before and after the blob data
- The blob data contains line breaks (CRLF). I want to add content before and after each line.
We are forced to use Java 7 in our project. Can anyone tell me what is the easiest and most performant way to do this?