| 49 | private File gzFile; |
| 50 | |
| 51 | @Before |
| 52 | public void setUp() throws Exception { |
| 53 | datFile = File.createTempFile("compTest", ".dat"); |
| 54 | gzFile = File.createTempFile("compTest", ".gz"); |
| 55 | FileOutputStream dat = new FileOutputStream(datFile); |
| 56 | GZIPOutputStream gz = new GZIPOutputStream(new FileOutputStream(gzFile)); |
| 57 | Random rand = new Random(); |
| 58 | for(int i = 0; i < 1024; i++) { |
| 59 | StringBuffer sb = new StringBuffer(); |
| 60 | int x = rand.nextInt(); |
| 61 | int y = rand.nextInt(); |
| 62 | sb.append(x); |
| 63 | sb.append('\t'); |
| 64 | sb.append(y); |
| 65 | sb.append('\n'); |
| 66 | byte bytes[] = sb.toString().getBytes(); |
| 67 | dat.write(bytes); |
| 68 | gz.write(bytes); |
| 69 | } |
| 70 | dat.close(); |
| 71 | gz.close(); |
| 72 | } |
| 73 | |
| 74 | @After |
| 75 | public void tearDown() throws Exception { |