1

I am reading a PCAP file byte by byte in Java using IO-Redirection System.in. It does not reads the bytes in correct manner. I am using

System.in.read(byte[], int off, int len);

When I do the same thing with

InputStream is = new DataInputStream(new BufferedInputStream(
                new FileInputStream(new File(filepath))));
is.read(byte[], int off, int len);

It works properly.

Any idead why?

Abhijit
  • 175
  • 5
  • 16

0 Answers0