Codota Logo
JSONWriter.write
Code IndexAdd Codota to your IDE (free)

How to use
write
method
in
org.dcm4che3.json.JSONWriter

Best Java code snippets using org.dcm4che3.json.JSONWriter.write (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: org.dcm4che.tool/dcm4che-tool-qc

private static JsonObject toAttributesObject(Attributes targetSeriesAttrs) {
  StringWriter strWriter = new StringWriter();
  JsonGenerator gen = Json.createGenerator(strWriter);
  JSONWriter writer = new JSONWriter(gen);
  writer.write(targetSeriesAttrs);
  gen.flush();
  gen.close();
  return Json.createReader(new StringReader(strWriter.toString()))
      .readObject();
}
origin: dcm4che/dcm4che

private void writeValue(Value value, boolean bigEndian) {
  if (value.isEmpty())
    return;
  if (value instanceof Sequence) {
    gen.writeStartArray("Value");
    for (Attributes item : (Sequence) value) {
      write(item);
    }
    gen.writeEnd();
  } else if (value instanceof Fragments) {
    gen.writeStartArray("DataFragment");
    Fragments frags = (Fragments) value;
    for (Object frag : frags) {
      if (frag instanceof Value && ((Value) frag).isEmpty())
        gen.writeNull();
      else {
        gen.writeStartObject();
        if (frag instanceof BulkData)
          writeBulkData((BulkData) frag);
        else {
          writeInlineBinary(frags.vr(), (byte[]) frag, bigEndian, true);
        }
        gen.writeEnd();
      }
    }
    gen.writeEnd();
  } else if (value instanceof BulkData) {
    writeBulkData((BulkData) value);
  }
}
origin: dcm4che/dcm4che

gen.writeStartArray();
for (Attributes metadata : instance.metadataList)
  new JSONWriter(gen).write(metadata);
gen.writeEnd();
gen.flush();
origin: org.dcm4che.tool/dcm4che-tool-stowrs

gen.writeStartArray();
for (Attributes metadata : instance.metadataList)
  new JSONWriter(gen).write(metadata);
gen.writeEnd();
gen.flush();
org.dcm4che3.jsonJSONWriterwrite

Popular methods of JSONWriter

  • <init>
  • encodeBase64
  • writeBulkData
  • writeDoubleValues
  • writeInlineBinary
  • writeIntValues
  • writePNGroup
  • writePersonName
  • writeStringValues
  • writeUIntValues
  • writeValue
  • writeValue

Popular in Java

  • Start an intent from android
  • notifyDataSetChanged (ArrayAdapter)
  • getExternalFilesDir (Context)
  • startActivity (Activity)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
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