Codota Logo
HL7Message.getBytes
Code IndexAdd Codota to your IDE (free)

How to use
getBytes
method
in
org.dcm4che3.hl7.HL7Message

Best Java code snippets using org.dcm4che3.hl7.HL7Message.getBytes (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
origin: dcm4che/dcm4che

  @Override
  public UnparsedHL7Message onMessage(HL7Application hl7App, Connection conn, Socket s, UnparsedHL7Message msg)
          throws HL7Exception {
    return new UnparsedHL7Message(
        HL7Message.makeACK(msg.msh(), HL7Exception.AA, null).getBytes(null));
  }
}
origin: dcm4che/dcm4che

private UnparsedHL7Message onMessage(UnparsedHL7Message msg)
      throws Exception {
    if (storageDir != null)
      storeToFile(msg.data(), new File(
            new File(storageDir, msg.msh().getMessageType()),
              msg.msh().getField(9, "_NULL_")));
    return new UnparsedHL7Message(tpls == null
      ? HL7Message.makeACK(msg.msh(), HL7Exception.AA, null).getBytes(null)
      : xslt(msg));
}
origin: org.dcm4che.tool/dcm4che-tool-hl7rcv

private UnparsedHL7Message onMessage(UnparsedHL7Message msg)
      throws Exception {
    if (storageDir != null)
      storeToFile(msg.data(), new File(
            new File(storageDir, msg.msh().getMessageType()),
              msg.msh().getField(9, "_NULL_")));
    return new UnparsedHL7Message(tpls == null
      ? HL7Message.makeACK(msg.msh(), HL7Exception.AA, null).getBytes(null)
      : xslt(msg));
}
origin: dcm4che/dcm4che

  public void query(String pid, String[] domains) throws IOException {
    HL7Message qbp = HL7Message.makePixQuery(pid, domains);
    HL7Segment msh = qbp.get(0);
    msh.setSendingApplicationWithFacility(sendingApplication);
    msh.setReceivingApplicationWithFacility(receivingApplication);
    msh.setField(17, charset);
    mllp.writeMessage(qbp.getBytes(charset));
    if (mllp.readMessage() == null)
      throw new IOException("Connection closed by receiver");
  }
}
origin: org.dcm4che.tool/dcm4che-tool-hl7pix

  public void query(String pid, String[] domains) throws IOException {
    HL7Message qbp = HL7Message.makePixQuery(pid, domains);
    HL7Segment msh = qbp.get(0);
    msh.setSendingApplicationWithFacility(sendingApplication);
    msh.setReceivingApplicationWithFacility(receivingApplication);
    msh.setField(17, charset);
    mllp.writeMessage(qbp.getBytes(charset));
    if (mllp.readMessage() == null)
      throw new IOException("Connection closed by receiver");
  }
}
origin: dcm4che/dcm4che

  public void run() {
    try {
      s.setSoTimeout(conn.getIdleTimeout());
      MLLPConnection mllp = new MLLPConnection(s);
      byte[] data;
      while ((data = mllp.readMessage()) != null) {
        HL7ConnectionMonitor monitor = hl7dev.getHL7ConnectionMonitor();
        UnparsedHL7Message msg = new UnparsedHL7Message(data);
        if (monitor != null)
          monitor.onMessageReceived(conn, s, msg);
        UnparsedHL7Message rsp;
        try {
          rsp = hl7dev.onMessage(conn, s, msg);
        if (monitor != null)
          monitor.onMessageProcessed(conn, s, msg, rsp, null);
        } catch (HL7Exception e) {
          rsp = new UnparsedHL7Message(
              HL7Message.makeACK(msg.msh(), e).getBytes(null));
          if (monitor != null)
            monitor.onMessageProcessed(conn, s, msg, rsp, e);
        }
        mllp.writeMessage(rsp.data());
      }
    } catch (IOException e) {
      LOG.warn("Exception on accepted connection {}:", s, e);
    } finally {
      conn.close(s);
    }
  }
}
org.dcm4che3.hl7HL7MessagegetBytes

Popular methods of HL7Message

  • makeACK
  • get
  • <init>
  • add
  • makePixQuery
  • parse
  • size
  • toString
  • trimToSize

Popular in Java

  • Finding current android device location
  • getContentResolver (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getApplicationContext (Context)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • JOptionPane (javax.swing)
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