ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(baos);
oos.writeObject(reg_be);
oos.flush();
oos.close();
InputStream is = new ByteArrayInputStream(baos.toByteArray());
Questo codice Convertire file Java Object
-InputStream
e come posso convertire InputStream
a un Object
? Devo convertire il mio Object
in un InputStream
quindi lo passo e voglio riavere il mio Object
.come convertire un flusso di input per un oggetto Java
ObjectInputStream sembra davvero evidente. – Gimby