1 24 package org.archive.io; 25 26 import java.io.IOException ; 27 import java.io.OutputStream ; 28 import java.io.RandomAccessFile ; 29 30 31 36 public class RandomAccessOutputStream extends OutputStream { 37 RandomAccessFile raf; 38 39 42 public RandomAccessOutputStream(RandomAccessFile raf) { 43 super(); 44 this.raf = raf; 45 } 46 47 50 public void write(int b) throws IOException { 51 raf.write(b); 52 } 53 54 57 public void close() throws IOException { 58 raf.close(); 59 } 60 61 64 public void write(byte[] b, int off, int len) throws IOException { 65 raf.write(b, off, len); 66 } 67 68 71 public void write(byte[] b) throws IOException { 72 raf.write(b); 73 } 74 } 75 | Popular Tags |