pipeline - Java PipedInputStream PipedOutputStream Size limitation -


I'm using the class), the file is large, I want to first open the file and parse directly instead of saving the unzip file and then want to parse it. However, it works only for small size files when I input a 1g file, then only one part (50000 lines) of the file is described in the input stream from the ports of the parsing module.

I tried to use the string to save the uncompressed file, and that is the only string in the string that is part of the unzipped file (close in the same 50000 th row as the pyred version Gaya). Any ideas about what has happened? Thanks a lot.

My code for pipeline is here:
  {new pipes inputstream (in PipInststream); // Last Piped Output for OutputStream Out = New Pipe OutputStream (in); // Out of the other new threads (New Runnabal () (Public Zero Run) (JavaUncompress.putDataOnOutputStream (inFile, out);}}) .start (); Doctor = Handler. Process DataInststream (In);} Public Static Zero putDataOnOutputStream (string inZipFileName, PipedOutputStream Out) {try {fileInputStream fis = new FileInputStream (inZipFileName); // FilterInputStream ftis = New FilterInputStream; New ZIPInproststream = Zis.getNextEntry ())! = Null {} System.out.println ("Extracting:" + Entry); byte data [] = new byte [buffer]; len = entry.getSize (long); long blk = len / buffer; int rem = (int) (len-blk * buffer); System.out Println (len + "=" + blk + "* buffer +" + rim); (long i = 0; i! = Blk; ++ i) {if ((zis.read (data, 0, buffer) ) = -1) {out.write (data);}} byte dramatium [] = new byte [rim]; if ((zis.read (dataRem, 0, rem)) -1 = {out.write (dataRem) ); Out.flush (); out.close (); }} Zis.close (); } Hold (exception e) {e.printStackTrace (); }}    

will block PipedOutputStream.write () Whatever bytes related to related PipedInputStream 4096 or above, but why do all this? Why not just open the file and process it in the same thread? There is no use of multi-threading in it, it's just a wasteful complexity.

I used pipe once in 15 years in Java and I quickly changed it to a line.

Comments