Package org.mp4parser.tools
Class CastUtils
- java.lang.Object
-
- org.mp4parser.tools.CastUtils
-
public class CastUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description CastUtils()
-
-
-
Method Detail
-
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
-
-