public static void writeArrayToOutputStream ( INDArray arr , OutputStream outputStream ) { ByteBuffer buffer = BinarySerde . toByteBuffer ( arr ) ; try ( WritableByteChannel channel = Channels . newChannel ( outputStream ) ) { channel . write ( buffer ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } }
Write an array to an output stream .