Tabnine Logo
OutputStreamSender
Code IndexAdd Tabnine to your IDE (free)

How to use
OutputStreamSender
in
com.marklogic.client.io

Best Java code snippets using com.marklogic.client.io.OutputStreamSender (Showing top 8 results out of 315)

origin: com.marklogic/client-api-java

  public void write(OutputStream out) throws IOException {
    if (logger != null) {
      OutputStream tee = logger.getPrintStream();
      long         max = logger.getContentMax();
      if (tee != null && max > 0) {
        handle.write(new OutputStreamTee(out, tee, max));

        return;
      }
    }

    handle.write(out);
  }
}
origin: com.marklogic/client-api-java

static XMLEventReader readOutputSender(OutputStreamSender sender) {
  try {
    if (sender == null) {
      return null;
    }
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    sender.write(baos);
    return readBytes(baos.toByteArray());
  } catch (IOException e) {
    throw new MarkLogicIOException(e);
  }
}
static XMLEventReader readReader(Reader reader) {
origin: marklogic/java-client-api

static XMLEventReader readOutputSender(OutputStreamSender sender) {
 try {
  if (sender == null) {
   return null;
  }
  ByteArrayOutputStream baos = new ByteArrayOutputStream();
  sender.write(baos);
  return readBytes(baos.toByteArray());
 } catch (IOException e) {
  throw new MarkLogicIOException(e);
 }
}
static XMLEventReader readReader(Reader reader) {
origin: marklogic/java-client-api

 @Override
 public void writeTo(BufferedSink sink) throws IOException {
  OutputStream out = sink.outputStream();

  if (logger != null) {
   OutputStream tee = logger.getPrintStream();
   long         max = logger.getContentMax();
   if (tee != null && max > 0) {
    handle.write(new OutputStreamTee(out, tee, max));

    return;
   }
  }

  handle.write(out);
 }
}
origin: marklogic/java-client-api

} else if (content instanceof OutputStreamSender) {
 ByteArrayOutputStream bytesStream = new ByteArrayOutputStream();
 ((OutputStreamSender) content).write(bytesStream);
 stringContent = bytesStream.toString("UTF-8");
} else if ( content instanceof byte[] ) {
origin: marklogic/java-client-api

} else if (content instanceof OutputStreamSender) {
 ByteArrayOutputStream buf = new ByteArrayOutputStream();
 ((OutputStreamSender) content).write(buf);
 return new StreamSource(
  new ByteArrayInputStream(buf.toByteArray()));
origin: com.marklogic/client-api-java

} else if (content instanceof OutputStreamSender) {
  ByteArrayOutputStream buf = new ByteArrayOutputStream();
  ((OutputStreamSender) content).write(buf);
  return new StreamSource(
      new ByteArrayInputStream(buf.toByteArray()));
origin: marklogic/java-client-api

Object value = handleBase.sendContent();
if ( value instanceof OutputStreamSender ) {
 ((OutputStreamSender) value).write(out);
} else {
 out.write(HandleAccessor.contentAsString(options).getBytes("UTF-8"));
com.marklogic.client.ioOutputStreamSender

Javadoc

An Output Stream Sender sends content to the database by writing to the provided OutputStream. When writing JSON, text, or XML content, you should use an OutputStream only only to write bytes for characters encoded in UTF-8. If the bytes provide characters with a different encoding, convert the bytes using the java.nio.charset.CharsetDecoder class.

Most used methods

  • write
    Implements a callback to write content to the provided output stream for sending to the database ser

Popular in Java

  • Making http requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • putExtra (Intent)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • BoxLayout (javax.swing)
  • JTextField (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now