public DocumentSequence documents() { return ensureDocuments(); }
final String userContentType = parseContentType(contentType); if (uri == null) { try { read(userContentType, null, inputStream, getContentType()); } finally { read(userContentType, getDataUri("-"), System.in, getContentType());
String charset = parseCharset(contentType); String serverBaseContentType = parseContentType(serverContentType); String serverCharset = parseCharset(serverContentType); tree.addAttribute(_contentType, contentType); if (!isText(contentType, charset)) { tree.addAttribute(_encoding, "base64"); tree.addAttribute(c_contentType, contentType); if (!isText(contentType, charset)) { tree.addAttribute(c_encoding, "base64"); if (isText(contentType, charset)) { BufferedReader bufread; if (charset == null) {
case URI: if (data) { ReadableData rdata = new ReadableData(this, XProcConstants.c_result, getStaticBaseURI().resolve(pipeline.getUri()).toASCIIString(), "text/plain"); pipeDoc = rdata.read(); } else { pipeDoc = parse(pipeline.getUri(), getStaticBaseURI().toASCIIString()); ReadableData rdata = new ReadableData(this, XProcConstants.c_result, pipeline.getInputStream(), "text/plain"); pipeDoc = rdata.read(); } else { pipeDoc = parse(new InputSource(pipeline.getInputStream()));
public ReadablePipe makeReadableData(XProcRuntime runtime, DataBinding binding) { return new ReadableData(runtime, binding.getWrapper(), binding.getHref(), binding.getContentType()); }
String charset = parseCharset(contentType); String serverBaseContentType = parseContentType(serverContentType); String serverCharset = parseCharset(serverContentType); tree.addAttribute(_contentType, contentType); if (!isText(contentType, charset)) { tree.addAttribute(_encoding, "base64"); tree.addAttribute(c_contentType, contentType); if (!isText(contentType, charset)) { tree.addAttribute(c_encoding, "base64"); if (isText(contentType, charset)) { BufferedReader bufread; if (charset == null) {
case URI: if (data) { ReadableData rdata = new ReadableData(this, XProcConstants.c_result, getStaticBaseURI().resolve(pipeline.getUri()).toASCIIString(), "text/plain"); pipeDoc = rdata.read(); } else { pipeDoc = parse(pipeline.getUri(), getStaticBaseURI().toASCIIString()); ReadableData rdata = new ReadableData(this, XProcConstants.c_result, pipeline.getInputStream(), "text/plain"); pipeDoc = rdata.read(); } else { pipeDoc = parse(new InputSource(pipeline.getInputStream()));
public ReadablePipe makeReadableData(XProcRuntime runtime, DataBinding binding) { return new ReadableData(runtime, binding.getWrapper(), binding.getHref(), binding.getContentType()); }
final String userContentType = parseContentType(contentType); if (uri == null) { try { read(userContentType, null, inputStream, getContentType()); } finally { read(userContentType, getDataUri("-"), System.in, getContentType());
switch (input.getKind()) { case URI: rd = new ReadableData(runtime, c_data, input.getUri(), input.getContentType()); doc = rd.read(); break; InputStream inputStream = input.getInputStream(); try { rd = new ReadableData(runtime, c_data, inputStream, input.getContentType()); doc = rd.read(); } finally { Closer.close(inputStream);
} else { ReadablePipe pipe = null; pipe = new ReadableData(runtime, XProcConstants.c_data, fi.getInputStream(), fi.getContentType()); doc = pipe.read(); logger.debug("Posting non-XML document to " + port + " for " + id);
public DocumentSequence documents() { return ensureDocuments(); }
switch (input.getKind()) { case URI: rd = new ReadableData(runtime, c_data, input.getUri(), input.getContentType()); doc = rd.read(); break; InputStream inputStream = input.getInputStream(); try { rd = new ReadableData(runtime, c_data, inputStream, input.getContentType()); doc = rd.read(); } finally { Closer.close(inputStream);
} else { ReadablePipe pipe = null; pipe = new ReadableData(runtime, XProcConstants.c_data, fi.getInputStream(), fi.getContentType()); doc = pipe.read(); logger.debug("Posting non-XML document to " + port + " for " + id);
public boolean moreDocuments() { DocumentSequence docs = ensureDocuments(); return pos < docs.size(); }
pipe = new ReadableDocument(runtime, doc, null, null, null); } else { pipe = new ReadableData(runtime, XProcConstants.c_data, entity.getStream(), entity.getMediaType().toString());
public boolean moreDocuments() { DocumentSequence docs = ensureDocuments(); return pos < docs.size(); }
pipe = new ReadableDocument(runtime, doc, null, null, null); } else { pipe = new ReadableData(runtime, XProcConstants.c_data, entity.getStream(), entity.getMediaType().toString());
public int documentCount() { DocumentSequence docs = ensureDocuments(); return docs.size(); }
pipe = new ReadableDocument(runtime, doc, null, null, null); } else { pipe = new ReadableData(runtime, XProcConstants.c_data, entity.getStream(), entity.getMediaType().toString());