public float getR4(int id) {
   Property p = (Property) properties.get(new Integer(id));
   try {
     int offset = p.getOffset();
     stream.seek(offset);
     return stream.readFloatLE();
   } catch (IOException e) {
     ImagingListenerProxy.errorOccurred(JaiI18N.getString("PropertySet6"), e, this, false);
     //            e.printStackTrace();
     return -1.0F;
   }
 }
  public int getUI1(int id) {
    Property p = (Property) properties.get(new Integer(id));
    try {
      int offset = p.getOffset();
      stream.seek(offset);
      return stream.readUnsignedByte();
    } catch (IOException e) {
      ImagingListenerProxy.errorOccurred(JaiI18N.getString("PropertySet1"), e, this, false);
      //            e.printStackTrace();
    }

    return -1;
  }
  public long getUI4(int id, long defaultValue) {
    Property p = (Property) properties.get(new Integer(id));
    if (p == null) {
      return defaultValue;
    }

    try {
      int offset = p.getOffset();
      stream.seek(offset);
      return stream.readUnsignedIntLE();
    } catch (IOException e) {
      ImagingListenerProxy.errorOccurred(JaiI18N.getString("PropertySet4"), e, this, false);
      //            e.printStackTrace();
    }

    return -1;
  }
  public byte[] getBlob(int id) {
    Property p = (Property) properties.get(new Integer(id));
    try {
      int offset = p.getOffset();
      stream.seek(offset);
      int length = stream.readIntLE();

      byte[] buf = new byte[length];
      stream.seek(offset + 4);
      stream.readFully(buf);

      return buf;
    } catch (IOException e) {
      ImagingListenerProxy.errorOccurred(JaiI18N.getString("PropertySet7"), e, this, false);
      //            e.printStackTrace();
      return null;
    }
  }
  public String getLPWSTR(int id) {
    Property p = (Property) properties.get(new Integer(id));
    try {
      int offset = p.getOffset();

      stream.seek(offset);
      int length = stream.readIntLE();
      StringBuffer sb = new StringBuffer(length);
      for (int i = 0; i < length; i++) {
        sb.append(stream.readCharLE());
      }

      return sb.toString();
    } catch (IOException e) {
      ImagingListenerProxy.errorOccurred(JaiI18N.getString("PropertySet5"), e, this, false);
      //            e.printStackTrace();
      return null;
    }
  }