@Override public long getContentSize() { byte[] buf = getContentAsByteArray(); return buf.length; }
@Override public void write(DataOutput out) throws IOException { super.write(out); tree.write(out); }
return null; doc.setFragmentOrdinal(tree.getFragmentOrdinal()); doc.setCollections(tree.getDocumentURI(), tree.getCollections()); doc.setMetadata(tree.getMetadata()); doc.setQuality(tree.getQuality()); return doc;
@Override public void readFields(DataInput in) throws IOException { super.readFields(in); tree = new ExpandedTree(); tree.readFields(in); rootNodeKind = tree.rootNodeKind(); str = tree.toString(); }
newOptions = (ContentCreateOptions)options.clone(); content = ((ForestDocument)value).createContent(uri, newOptions, isCopyColls, isCopyMeta, isCopyQuality); } else if (value instanceof BytesWritable) {
continue; value = (VALUEIN) ForestDocument.createDocument(conf, largeForestDir, tree, uri); if (value == null) { // send to DocumentMapper for book keeping
@Override public void readFields(DataInput in) throws IOException { super.readFields(in); ExpandedTree tree = new ExpandedTree(); tree.readFields(in); doc = (Document)tree.node(0); rootNodeKind = tree.rootNodeKind(); }
@Override public void write(DataOutput out) throws IOException { super.write(out); ((NodeImpl)doc).getExpandedTree().write(out); }
@Override public InputStream getContentAsByteStream() { return new ByteArrayInputStream(getContentAsByteArray()); }