| 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 | |
public RandomAccessFileOutputStream(final RandomAccessFile target) { |
| 26 | 133 | super(); |
| 27 | 133 | this.targetFile = target; |
| 28 | 133 | } |
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | |
|
| 33 | |
@Override |
| 34 | |
public void write(final byte[] bytes, final int off, final int len) |
| 35 | |
throws IOException { |
| 36 | 16653 | this.targetFile.write(bytes, off, len); |
| 37 | 16653 | } |
| 38 | |
|
| 39 | |
|
| 40 | |
|
| 41 | |
|
| 42 | |
@Override |
| 43 | |
public void write(final int toWrite) throws IOException { |
| 44 | 0 | this.targetFile.write(toWrite); |
| 45 | 0 | } |
| 46 | |
|
| 47 | |
} |