Android - clone datainputstream

 
Vista:
sin imagen de perfil

clone datainputstream

Publicado por jvb2008 (8 intervenciones) el 07/04/2016 10:28:02
Hello all,

I am creating an app for Android and a I need to save in two different variables the same part (64B) of the stream. How can I clone the stream in order to for save in two different variables the same part of stream? Otherwise, how can I position the pointer in the stream in order to read twice the same part of the stream?

I am using this:

DataInputStream in;
in.read(data,0 , numBytesRead);

Thanks so much,
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil
Val: 112
Bronce
Ha disminuido 1 puesto en Android (en relación al último mes)
Gráfica de Android

clone datainputstream

Publicado por yamil bracho (100 intervenciones) el 07/04/2016 17:18:35
Let me see if I follow you...
You wanto to read bytes in an InputStream twice ? If I am right, just read once and clone or copy the array or use mark() and reset() methods of InputStream
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar