Advertisement
Guest User

Untitled

a guest
Jan 7th, 2017
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. package main;
  2.  
  3. import java.io.BufferedInputStream;
  4. import java.io.DataInputStream;
  5. import java.io.File;
  6. import java.io.FileInputStream;
  7. import java.io.FileOutputStream;
  8. import java.io.IOException;
  9. import java.io.PrintStream;
  10. import java.util.Locale;
  11.  
  12. public class index {
  13.  
  14. public static void main(String[] args) throws IOException {
  15. // TODO Auto-generated method stub
  16. short v1,v2,v3,v4,v5,v6,v7,v8=0;
  17. System.out.println("START");
  18.  
  19. PrintStream out = new PrintStream(new FileOutputStream("indices.txt", true));
  20. System.setOut(out);
  21.  
  22. DataInputStream data_in = new DataInputStream(
  23. new BufferedInputStream(
  24. new FileInputStream(
  25. new File("index-data-decompressed.block"))));
  26.  
  27. while(true) {
  28. try {
  29. v1 = data_in.readShort();
  30. v2 = data_in.readShort();
  31. v3 = data_in.readShort();
  32. // add 1 to every value thanks to shakotay2 for the suggest
  33. v1 += 1;
  34. v2 += 1;
  35. v3 += 1;
  36.  
  37. System.out.print("f " + v1 + " " + v2 + " " + v3);
  38.  
  39. System.out.println();
  40. }
  41. catch (java.io.EOFException eof) {
  42. break;
  43. }
  44. }
  45.  
  46. data_in.close();
  47. }
  48.  
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement