congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
JSONWriter.write
Code IndexAdd Tabnine 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)

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

  • Reading from database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • onRequestPermissionsResult (Fragment)
  • addToBackStack (FragmentTransaction)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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