/** * Sets byte values into this tag. This method should be used for tags of * type {@link #TYPE_UNSIGNED_BYTE} or {@link #TYPE_UNDEFINED}. This method * will fail if: * <ul> * <li>The component type of this tag is not {@link #TYPE_UNSIGNED_BYTE} or * {@link #TYPE_UNDEFINED} .</li> * <li>The length does NOT match the component count in the definition for * this tag.</li> * </ul> */ public boolean setValue( byte[] value, int offset, int length ) { if( checkBadComponentCount( length ) ) { return false; } if( mDataType != TYPE_UNSIGNED_BYTE && mDataType != TYPE_UNDEFINED ) { return false; } mValue = new byte[length]; System.arraycopy( value, offset, mValue, 0, length ); mComponentCountActual = length; return true; }
/** * Sets byte values into this tag. This method should be used for tags of * type {@link #TYPE_UNSIGNED_BYTE} or {@link #TYPE_UNDEFINED}. This method * will fail if: * <ul> * <li>The component type of this tag is not {@link #TYPE_UNSIGNED_BYTE} or * {@link #TYPE_UNDEFINED} .</li> * <li>The length does NOT match the component count in the definition for * this tag.</li> * </ul> */ public boolean setValue( byte[] value, int offset, int length ) { if( checkBadComponentCount( length ) ) { return false; } if( mDataType != TYPE_UNSIGNED_BYTE && mDataType != TYPE_UNDEFINED ) { return false; } mValue = new byte[length]; System.arraycopy( value, offset, mValue, 0, length ); mComponentCountActual = length; return true; }
if( checkBadComponentCount( count ) ) { return false;
if( checkBadComponentCount( count ) ) { return false;
/** * Sets long values into this tag. This method should be used for tags of * type {@link #TYPE_UNSIGNED_LONG}. This method will fail if: * <ul> * <li>The component type of this tag is not {@link #TYPE_UNSIGNED_LONG}.</li> * <li>The value overflows.</li> * <li>The value.length does NOT match the component count in the definition * for this tag.</li> * </ul> */ public boolean setValue( long[] value ) { if( checkBadComponentCount( value.length ) || mDataType != TYPE_UNSIGNED_LONG ) { return false; } if( checkOverflowForUnsignedLong( value ) ) { return false; } mValue = value; mComponentCountActual = value.length; return true; }
/** * Sets long values into this tag. This method should be used for tags of * type {@link #TYPE_UNSIGNED_LONG}. This method will fail if: * <ul> * <li>The component type of this tag is not {@link #TYPE_UNSIGNED_LONG}.</li> * <li>The value overflows.</li> * <li>The value.length does NOT match the component count in the definition * for this tag.</li> * </ul> */ public boolean setValue( long[] value ) { if( checkBadComponentCount( value.length ) || mDataType != TYPE_UNSIGNED_LONG ) { return false; } if( checkOverflowForUnsignedLong( value ) ) { return false; } mValue = value; mComponentCountActual = value.length; return true; }
if( checkBadComponentCount( value.length ) ) { return false;
if( checkBadComponentCount( value.length ) ) { return false;
if( checkBadComponentCount( value.length ) ) { return false;
if( checkBadComponentCount( value.length ) ) { return false;