com.coremedia.iso.boxes
Class CastUtils
java.lang.Object
com.coremedia.iso.boxes.CastUtils
public class CastUtils
- extends Object
Created by IntelliJ IDEA.
User: sannies
Date: 2/9/12
Time: 8:58 PM
To change this template use File | Settings | File Templates.
Method Summary |
static int |
l2i(long l)
Casts a long to an int. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CastUtils
public CastUtils()
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 to
Integer.MAX_VALUE
this 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
Copyright © 2012. All Rights Reserved.