Ejemplo n.º 1
0
 /**
  * @param vl
  * @param i
  * @exception IOException
  * @exception DicomException
  */
 private void doCommonConstructorStuff(long vl, DicomInputStream i)
     throws IOException, DicomException {
   flushCachedCopies();
   if (vl % bytesPerValue != 0) {
     i.skipInsistently(vl);
     throw new DicomException(
         "incorrect value length ("
             + vl
             + " dec) for VR "
             + getVRAsString()
             + " - skipping value length bytes to get to next data element");
   } else {
     int vm = (int) (vl / bytesPerValue);
     values = null;
     for (int j = 0; j < vm; ++j) addValue((short) (i.readSigned16()));
   }
 }
 /**
  * Read an attribute from an input stream.
  *
  * @param t the tag of the attribute
  * @param vl the value length of the attribute
  * @param i the input stream
  * @param byteOffset the byte offset in the input stream of the start of the data
  * @throws IOException
  * @throws DicomException
  */
 public OtherWordAttributeOnDisk(AttributeTag t, Long vl, DicomInputStream i, Long byteOffset)
     throws IOException, DicomException {
   super(t, vl, i, byteOffset);
   bigEndian = i.isBigEndian();
 }