- java.lang.Object
-
- org.scijava.testutil.ArrayIO
-
public final class ArrayIO extends Object
Utility functions for reading and writing arrays simply.- Author:
- Curtis Rueden
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]bytes(InputStream is)static double[]doubles(InputStream is)static float[]floats(InputStream is)static int[]ints(InputStream is)static long[]longs(InputStream is)static short[]shorts(InputStream is)static voidwriteBytes(byte[] data, OutputStream os)static voidwriteDoubles(double[] data, OutputStream os)static voidwriteFloats(float[] data, OutputStream os)static voidwriteInts(int[] data, OutputStream os)static voidwriteLongs(long[] data, OutputStream os)static voidwriteShorts(short[] data, OutputStream os)
-
-
-
Method Detail
-
bytes
public static byte[] bytes(InputStream is) throws IOException
- Throws:
IOException
-
doubles
public static double[] doubles(InputStream is) throws IOException
- Throws:
IOException
-
floats
public static float[] floats(InputStream is) throws IOException
- Throws:
IOException
-
ints
public static int[] ints(InputStream is) throws IOException
- Throws:
IOException
-
longs
public static long[] longs(InputStream is) throws IOException
- Throws:
IOException
-
shorts
public static short[] shorts(InputStream is) throws IOException
- Throws:
IOException
-
writeBytes
public static void writeBytes(byte[] data, OutputStream os) throws IOException- Throws:
IOException
-
writeDoubles
public static void writeDoubles(double[] data, OutputStream os) throws IOException- Throws:
IOException
-
writeFloats
public static void writeFloats(float[] data, OutputStream os) throws IOException- Throws:
IOException
-
writeInts
public static void writeInts(int[] data, OutputStream os) throws IOException- Throws:
IOException
-
writeLongs
public static void writeLongs(long[] data, OutputStream os) throws IOException- Throws:
IOException
-
writeShorts
public static void writeShorts(short[] data, OutputStream os) throws IOException- Throws:
IOException
-
-