Code example for Map

Methods: get, put

0
  Map<String, ByteArrayOutputStream> outStreams = Maps.newHashMap();
 
  @Override 
  public OutputStream makeOutputStream(String filename) throws IOException
  { 
    ByteArrayOutputStream stream = outStreams.get(filename);
 
    if (stream == null) {
      stream = new ByteArrayOutputStream();
      outStreams.put(filename, stream);
    } 
 
    return stream;
  } 
 
  @Override 
  public InputStream makeInputStream(String filename) throws IOException
  { 
    ByteArrayOutputStream outStream = outStreams.get(filename);
 
    if (outStream == null) {