org.linkedin.util-core/src/main/java/org/linkedin/util/io/resource/RAMResource.java
@Override
  public InputStream getInputStream() throws IOException
  {
    RAMEntry entry = getRAMEntry();

    if(entry == null || entry instanceof RAMDirectory)
      throw new ResourceNotFoundException(toURI());

    return new ByteArrayInputStream(((RAMFile) entry).getContent());
  }
@Override
  public InputStream getInputStream() throws IOException
  {
    RAMEntry entry = getRAMEntry();

    if(entry == null || entry instanceof RAMDirectory)
      throw new ResourceNotFoundException(toURI());

    return new ByteArrayInputStream(((RAMFile) entry).getContent());
  }
@ Override public InputStream getInputStream ( ) throws IOException { RAMEntry entry = getRAMEntry ( ) ; if ( entry == null || entry instanceof RAMDirectory ) throw new ResourceNotFoundException ( toURI ( ) ) ; return new ByteArrayInputStream ( ( ( RAMFile ) entry ) . getContent ( ) ) ; }
Important note: the caller of this method is responsible for properly closing the input
stream!

@return an input stream to the resource.
@throws IOException if cannot get an input stream
Important note : the caller of this method is responsible for properly closing the input stream!