Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main;
- import java.io.BufferedInputStream;
- import java.io.DataInputStream;
- import java.io.File;
- import java.io.FileInputStream;
- import java.io.FileOutputStream;
- import java.io.IOException;
- import java.io.PrintStream;
- import java.util.Locale;
- public class index {
- public static void main(String[] args) throws IOException {
- // TODO Auto-generated method stub
- short v1,v2,v3,v4,v5,v6,v7,v8=0;
- System.out.println("START");
- PrintStream out = new PrintStream(new FileOutputStream("indices.txt", true));
- System.setOut(out);
- DataInputStream data_in = new DataInputStream(
- new BufferedInputStream(
- new FileInputStream(
- new File("index-data-decompressed.block"))));
- while(true) {
- try {
- v1 = data_in.readShort();
- v2 = data_in.readShort();
- v3 = data_in.readShort();
- // add 1 to every value thanks to shakotay2 for the suggest
- v1 += 1;
- v2 += 1;
- v3 += 1;
- System.out.print("f " + v1 + " " + v2 + " " + v3);
- System.out.println();
- }
- catch (java.io.EOFException eof) {
- break;
- }
- }
- data_in.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement