View Javadoc

1   package fr.in2p3.jsaga.adaptor.data;
2   
3   
4   import java.io.IOException;
5   import java.io.OutputStream;
6   
7   import org.irods.jargon.core.pub.io.IRODSRandomAccessFile;
8   
9   /* ***************************************************
10   * *** Centre de Calcul de l'IN2P3 - Lyon (France) ***
11   * ***             http://cc.in2p3.fr/             ***
12   * ***************************************************
13   * File:   IrodsAppendedOutputStream
14   * Author: Pascal Calvat (pcalvat@cc.in2p3.fr)
15   * Date:   13 may 2008
16   * ***************************************************
17   * Description:                                      */
18  /**
19   *
20   */
21  public class IrodsAppendedOutputStream extends OutputStream {
22  	private IRODSRandomAccessFile randomAccessFile;
23  	
24  	public IrodsAppendedOutputStream(IRODSRandomAccessFile randomAccessFile) {
25  		this.randomAccessFile = randomAccessFile;
26  	}
27  	
28  	public void close() throws IOException {
29  		randomAccessFile.close();
30  	}
31  
32  	public void flush() throws IOException {
33  		//randomAccessFile.flush();
34  	}
35  	
36  	public void write(byte[] b) throws IOException {
37  		randomAccessFile.write(b);
38  	}
39  	
40  	public void write(byte[] b, int off, int len) throws IOException {
41  		randomAccessFile.write(b, off, len);
42  	}
43  	
44  	public void write(int b)  throws IOException {
45  		randomAccessFile.write(b);
46  	}
47  }