Package org.mp4parser.tools
Class CastUtils
java.lang.Object
org.mp4parser.tools.CastUtils
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CastUtils
public CastUtils()
-
-
Method Details
-
l2i
public static int l2i(long l) Casts a long to an int. In many cases I use a long for a UInt32 but this cannot be used to allocate ByteBuffers or arrays since they restricted toInteger.MAX_VALUEthis cast-method will throw a RuntimeException if the cast would cause a loss of information.- Parameters:
l- the long value- Returns:
- the long value as int
-