1 package com.quadcap.io; 2 3 40 41 import java.io.IOException ; 42 import java.io.OutputStream ; 43 import java.io.RandomAccessFile ; 44 45 import com.quadcap.util.Debug; 46 import com.quadcap.util.Util; 47 48 53 54 public class RandomAccessFileOutputStream extends OutputStream { 55 RandomAccessFile ra; 56 57 public RandomAccessFileOutputStream(RandomAccessFile ra) { 58 this.ra = ra; 59 } 60 61 public void write(int b) throws IOException { 62 ra.write(b); 65 } 66 67 public void write(byte[] buf, int offset, int len) throws IOException { 68 ra.write(buf, offset, len); 71 } 72 73 public void write(byte[] buf) throws IOException { 74 ra.write(buf); 77 } 78 79 public void flush() throws IOException { 80 } 83 84 public void close() throws IOException { 85 ra.close(); 87 } 88 } 89 | Popular Tags |