0

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:

  1. Add additional content from iterators before and after the blob data
  2. 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?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
TinMan
  • 3
  • 2
  • Possible duplicate of [Filter (search and replace) array of bytes in an InputStream](https://stackoverflow.com/questions/7743534/filter-search-and-replace-array-of-bytes-in-an-inputstream) – Flown Dec 01 '17 at 09:38
  • Thanks for the link. I've read it and i'm not quite sure whether i should use `FilterInputStream` or a `BufferedReader`. The blob can be big. – TinMan Dec 01 '17 at 13:17

0 Answers0