func putInteger(log logger.T, byteArray []byte, offset int, value int32) (err error) {
	byteArrayLength := len(byteArray)
	if offset > byteArrayLength-1 || offset+4 > byteArrayLength-1 || offset < 0 {
		log.Error("putInteger failed: Offset is invalid.")
		return errors.New("Offset is outside the byte array.")
	}

	bytes, err := integerToBytes(log, value)
	if err != nil {
		log.Error("putInteger failed: getBytesFromInteger Failed.")
		return err
	}

	copy(byteArray[offset:offset+4], bytes)
	return nil
}
// putInteger puts an integer value to a byte array starting from the specified offset.
putInteger puts an integer value to a byte array starting from the specified offset.
// putInteger puts an integer value to a byte array starting from the specified offset .
func putInteger(log logger.T, byteArray []byte, offset int, value int32) (err error) {
	byteArrayLength := len(byteArray)
	if offset > byteArrayLength-1 || offset+4 > byteArrayLength-1 || offset < 0 {
		log.Error("putInteger failed: Offset is invalid.")
		return errors.New("Offset is outside the byte array.")
	}
	bytes, err := integerToBytes(log, value)
	if err != nil {
		log.Error("putInteger failed: getBytesFromInteger Failed.")
		return err
	}
	copy(byteArray[offset:offset+4], bytes)
	return nil
}
func putInteger ( log logger . T , byteArray [ ] byte , offset int , value int32 ) ( err error ) { byteArrayLength := len ( byteArray ) if offset > byteArrayLength - 1 || offset + 4 > byteArrayLength - 1 || offset < 0 { log . Error ( " " ) return errors . New ( " " ) } bytes , err := integerToBytes ( log , value ) if err != nil { log . Error ( " " ) return err } copy ( byteArray [ offset : offset + 4 ] , bytes ) return nil }
putInteger puts an integer value to a byte array starting from the specified offset.
putInteger puts an integer value to a byte array starting from the specified offset .