![JAR search and dependency download from the Maven repository](/logo.png)
com.googlecode.mp4parser.util.Mp4Arrays Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of isoparser Show documentation
Show all versions of isoparser Show documentation
A generic parser and writer for all ISO 14496 based files (MP4, Quicktime, DCF, PDCF, ...)
package com.googlecode.mp4parser.util;
import java.lang.reflect.Array;
/**
* Created by sannies on 02.05.2015.
*/
public final class Mp4Arrays {
private Mp4Arrays() {
}
public static long[] copyOfAndAppend(long[] original, long... toAppend) {
if (original == null) {
original = new long[]{};
}
if (toAppend == null) {
toAppend = new long[]{};
}
long[] copy = new long[original.length + toAppend.length];
System.arraycopy(original, 0, copy, 0, original.length);
System.arraycopy(toAppend, 0, copy, original.length, toAppend.length);
return copy;
}
public static int[] copyOfAndAppend(int[] original, int... toAppend) {
if (original == null) {
original = new int[]{};
}
if (toAppend == null) {
toAppend = new int[]{};
}
int[] copy = new int[original.length + toAppend.length];
System.arraycopy(original, 0, copy, 0, original.length);
System.arraycopy(toAppend, 0, copy, original.length, toAppend.length);
return copy;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy