Codota Logo
OutputStreamSender
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
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

  • Start an intent from android
  • scheduleAtFixedRate (Timer)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • Kernel (java.awt.image)
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Notification (javax.management)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Runner (org.openjdk.jmh.runner)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now