@Test void writeSequenceExplicitSequenceLength() throws IOException { assertArrayEquals(EXPL_SEQ_LEN, writeDataset(DicomEncoding.IVR_LE, true, DicomOutputStream.LengthEncoding.EXPLICIT, DicomOutputStream.LengthEncoding.UNDEFINED, sequences())); }
public void writeDataSet(DicomObject dcmobj) throws IOException { if (encoding == null) throw new IllegalStateException("encoding not initialized"); Objects.requireNonNull(dcmobj); if (includeGroupLength || itemLengthEncoding.calculate || sequenceLengthEncoding.calculate) { ((DicomObjectImpl) dcmobj).calculateItemLength(this); } ((DicomObjectImpl) dcmobj).writeTo(this); if (out instanceof DeflaterOutputStream) { ((DeflaterOutputStream) out).finish(); } }
DicomOutputStream extends OutputStream { public void writeDataSet(DicomObject dcmobj) throws IOException { if (encoding == null) throw new IllegalStateException("encoding not initialized"); Objects.requireNonNull(dcmobj); if (includeGroupLength || itemLengthEncoding.calculate || sequenceLengthEncoding.calculate) { ((DicomObjectImpl) dcmobj).calculateItemLength(this); } ((DicomObjectImpl) dcmobj).writeTo(this); if (out instanceof DeflaterOutputStream) { ((DeflaterOutputStream) out).finish(); } } }
DicomOutputStream extends OutputStream { public void writeDataSet(DicomObject dcmobj) throws IOException { if (encoding == null) throw new IllegalStateException("encoding not initialized"); Objects.requireNonNull(dcmobj); if (includeGroupLength || itemLengthEncoding.calculate || sequenceLengthEncoding.calculate) { ((DicomObjectImpl) dcmobj).calculateItemLength(this); } ((DicomObjectImpl) dcmobj).writeTo(this); if (out instanceof DeflaterOutputStream) { ((DeflaterOutputStream) out).finish(); } } DicomOutputStream(OutputStream out); }
DicomOutputStream extends OutputStream { public void writeDataSet(DicomObject dcmobj) throws IOException { if (encoding == null) throw new IllegalStateException("encoding not initialized"); Objects.requireNonNull(dcmobj); if (includeGroupLength || itemLengthEncoding.calculate || sequenceLengthEncoding.calculate) { ((DicomObjectImpl) dcmobj).calculateItemLength(this); } ((DicomObjectImpl) dcmobj).writeTo(this); if (out instanceof DeflaterOutputStream) { ((DeflaterOutputStream) out).finish(); } } DicomOutputStream(OutputStream out); DicomEncoding getEncoding(); DicomOutputStream withEncoding(DicomEncoding encoding); DicomOutputStream withEncoding(DicomObject fmi); boolean isIncludeGroupLength(); DicomOutputStream withIncludeGroupLength(boolean includeGroupLength); LengthEncoding getItemLengthEncoding(); DicomOutputStream withItemLengthEncoding(LengthEncoding itemLengthEncoding); LengthEncoding getSequenceLengthEncoding(); DicomOutputStream withSequenceLengthEncoding(LengthEncoding sequenceLengthEncoding); @Override void write(int b); @Override void write(byte[] b, int off, int len); @Override void flush(); @Override void close(); void writeHeader(int tag, VR vr, int length); DicomOutputStream writeFileMetaInformation(DicomObject fmi); void writeDataSet(DicomObject dcmobj); void writeCommandSet(DicomObject dcmobj); byte[] swapBuffer(); void writeUTF(String s); }
DicomOutputStream extends OutputStream { public void writeDataSet(DicomObject dcmobj) throws IOException { if (encoding == null) throw new IllegalStateException("encoding not initialized"); Objects.requireNonNull(dcmobj); if (includeGroupLength || itemLengthEncoding.calculate || sequenceLengthEncoding.calculate) { ((DicomObjectImpl) dcmobj).calculateItemLength(this); } ((DicomObjectImpl) dcmobj).writeTo(this); if (out instanceof DeflaterOutputStream) { ((DeflaterOutputStream) out).finish(); } } DicomOutputStream(OutputStream out); DicomEncoding getEncoding(); DicomOutputStream withEncoding(DicomEncoding encoding); DicomOutputStream withEncoding(DicomObject fmi); boolean isIncludeGroupLength(); DicomOutputStream withIncludeGroupLength(boolean includeGroupLength); LengthEncoding getItemLengthEncoding(); DicomOutputStream withItemLengthEncoding(LengthEncoding itemLengthEncoding); LengthEncoding getSequenceLengthEncoding(); DicomOutputStream withSequenceLengthEncoding(LengthEncoding sequenceLengthEncoding); @Override void write(int b); @Override void write(byte[] b, int off, int len); @Override void flush(); @Override void close(); void writeHeader(int tag, VR vr, int length); DicomOutputStream writeFileMetaInformation(DicomObject fmi); void writeDataSet(DicomObject dcmobj); void writeCommandSet(DicomObject dcmobj); byte[] swapBuffer(); void writeUTF(String s);  }