String iuid = rq.getString(Tag.AffectedSOPInstanceUID);
File file = new File(storageDir, iuid);
if (file.exists())
throw new DicomServiceException(Status.DuplicateSOPinstance).
setUID(Tag.AffectedSOPInstanceUID, iuid);
DicomOutputStream out = null;
LOG.info("{}: M-WRITE {}", as, file);
try {
out = new DicomOutputStream(file);
out.writeDataset(
Attributes.createFileMetaInformation(iuid, cuid,
UID.ExplicitVRLittleEndian),
rqAttrs);
} catch (IOException e) {
LOG.warn(as + ": Failed to store MPPS:", e);