I have a very large HashMap of the format HashMap<String, List<String>>, and I want to serialize it using BufferedOutputStream because I think that it will be more efficient than with a regular OutputStream.
But how do I divide the HashMap in chunks of the size of the buffer? Should I just iterate through the HashMap?