| 1 | |
package org.jaudiotagger.audio.asf.io; |
| 2 | |
|
| 3 | |
import java.io.IOException; |
| 4 | |
import java.io.OutputStream; |
| 5 | |
import java.io.RandomAccessFile; |
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
public final class RandomAccessFileOutputStream extends OutputStream { |
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
|
| 17 | |
private final RandomAccessFile targetFile; |
| 18 | |
|
| 19 | |
|
| 20 | |
|
| 21 | |
|
| 22 | |
|
| 23 | |
|
| 24 | |
|
| 25 | 25 | public RandomAccessFileOutputStream(RandomAccessFile target) { |
| 26 | 25 | this.targetFile = target; |
| 27 | 25 | } |
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | |
@Override |
| 33 | |
public void write(byte[] b, int off, int len) throws IOException { |
| 34 | 3000 | this.targetFile.write(b, off, len); |
| 35 | 3000 | } |
| 36 | |
|
| 37 | |
|
| 38 | |
|
| 39 | |
|
| 40 | |
@Override |
| 41 | |
public void write(int b) throws IOException { |
| 42 | 0 | this.targetFile.write(b); |
| 43 | 0 | } |
| 44 | |
|
| 45 | |
} |