Example usage for java.lang Math multiplyExact

List of usage examples for java.lang Math multiplyExact

Introduction

In this page you can find the example usage for java.lang Math multiplyExact.

Prototype

@HotSpotIntrinsicCandidate
public static long multiplyExact(long x, long y) 

Source Link

Document

Returns the product of the arguments, throwing an exception if the result overflows a long .

Usage

From source file:org.codice.alliance.video.stream.mpegts.rollover.MegabyteCountRolloverCondition.java

private long getByteCountThreshold() {
    return Math.multiplyExact(megabyteCountThreshold, MEGABYTE_TO_BYTE_FACTOR);
}