Package org.linkedin.util.io.ram

Examples of org.linkedin.util.io.ram.RAMEntry


   * @throws IOException if cannot get an input stream
   */
  @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());
View Full Code Here


   * @throws IOException if cannot get information
   */
  @Override
  public ResourceInfo getInfo() throws IOException
  {
    RAMEntry entry = getRAMEntry();

    if(entry != null)
      return new StaticInfo(entry.getContentLength(),
                            entry.lastModified());
    else
      throw new ResourceNotFoundException(toURI());
  }
View Full Code Here

  public boolean doList(String path, ResourceFilter filter)
  {
    if(_root == null)
      return false;

    RAMEntry entry = _root.getEntryByPath(path);

    if(entry instanceof RAMDirectory)
    {
      RAMDirectory ramDirectory = (RAMDirectory) entry;
      for(RAMEntry ramEntry : ramDirectory.ls())
View Full Code Here

TOP

Related Classes of org.linkedin.util.io.ram.RAMEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.