Java ByteInputStream Problem

Dibatalkan Dipasang Jan 29, 2009 Dibayar saat pengiriman
Dibatalkan Dibayar saat pengiriman

I have some java code which reads in data from a file and parses it as follows: DataInputStream dis; byte[] packet; int start_offs; [url removed, login to view] = new DataInputStream(new ByteArrayInputStream(packet, start_offs, [url removed, login to view])); the code does: byte ContentType = [url removed, login to view](); to get the next piece of data as needed. Now, I need to keep this code to read the data from a file but there is another case where I have the Byte Array already in memory and do not need to read it into a file. How can I get the DataInputStream to use that Byte Array and read it as if it were a ByteArrayInputStream? I do not want to write the byte array out into a file & read it in again.

Teknik Java Microsoft MySQL PHP Perancangan Perangkat Lunak Pengujian Perangkat Lunak Destop Windows

ID Proyek: #3588658

Tentang proyek

5 proposal Proyek online Aktif Jan 29, 2009

5 freelancer rata-rata menawar $6 untuk pekerjaan ini

TopOfStack

See private message.

$4.25 USD dalam 1 hari
(192 Ulasan)
7.3
ricks7

See private message.

$8.5 USD dalam 1 hari
(88 Ulasan)
5.2
egycodersvw

See private message.

$6.8 USD dalam 1 hari
(45 Ulasan)
4.6
hirshah25

See private message.

$3.4 USD dalam 1 hari
(7 Ulasan)
2.5
nadimpalliramesh

See private message.

$6.8 USD dalam 1 hari
(0 Ulasan)
0.0