Package v7db.files.spi

Examples of v7db.files.spi.InlineContent$RepeatedInputStream


  }

  public ContentPointer getContentPointer(BSONObject metaData) {
    byte[] inline = (byte[]) metaData.get("in");
    if (inline != null) {
      return new InlineContent(inline);
    }
    byte[] sha = (byte[]) metaData.get("sha");
    if (sha == null)
      return null;
    return new StoredContent(sha, BSONUtils.getRequiredLong(metaData,
View Full Code Here


    if (data.length > inlineUntil)
      return insertContentsAndBackRefs(data, 0, data.length, fileId,
          filename, contentType);

    return makeMetaData(filename, contentType, new InlineContent(data));

  }
View Full Code Here

      return insertContentsAndBackRefs(data, offset, length, fileId,
          filename, contentType);

    refTracking.updateReferences(fileId);

    return makeMetaData(filename, contentType, new InlineContent(data,
        offset, length));

  }
View Full Code Here

      return insertContentsAndBackRefs(new FileInputStream(data), fileId,
          filename, contentType);

    refTracking.updateReferences(fileId);

    return makeMetaData(filename, contentType, new InlineContent(FileUtils
        .readFileToByteArray(data)));

  }
View Full Code Here

      byte[] base = MapUtils.getRequiredBytes(data, "base.sha");
      long offset = MapUtils.getRequiredLong(data, "off");
      long length = MapUtils.getRequiredLong(data, "end") - offset;
      byte[] unzipped = IOUtils.toByteArray(Compression.unzip(storage
          .getContent(base).getInputStream(offset, length)));
      return new InlineContent(unzipped);
    }
View Full Code Here

TOP

Related Classes of v7db.files.spi.InlineContent$RepeatedInputStream

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.