public final class WavRandomAccessFile
extends java.lang.Object
implements java.io.DataInput, java.io.DataOutput
| Constructor and Description |
|---|
WavRandomAccessFile(java.io.File file,
java.lang.String mode) |
WavRandomAccessFile(java.lang.String name,
java.lang.String mode) |
| Modifier and Type | Method and Description |
|---|---|
void |
blockAlign()
If the filepointer is currently at an odd position, it will advance to an
even position.
|
void |
close() |
java.nio.channels.FileChannel |
getChannel() |
long |
getFilePointer() |
java.io.RandomAccessFile |
getRandomAccessFile() |
long |
length() |
int |
read(byte[] b) |
boolean |
readBoolean() |
byte |
readByte() |
char |
readChar() |
double |
readDouble() |
float |
readFloat() |
void |
readFully(byte[] b) |
void |
readFully(byte[] b,
int off,
int len) |
int |
readInt() |
java.lang.String |
readLine() |
long |
readLong() |
short |
readShort() |
int |
readUnsignedByte() |
long |
readUnsignedInt() |
int |
readUnsignedShort() |
java.lang.String |
readUTF() |
void |
seek(long pos) |
int |
skipBytes(int n) |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
void |
writeBlockAlign()
If the filepointer is currently at an odd position, it will advance to an
even position by writing a byte with value 0x00.
|
void |
writeBoolean(boolean v) |
void |
writeByte(int v) |
void |
writeBytes(java.lang.String s) |
void |
writeChar(int v) |
void |
writeChars(java.lang.String s) |
void |
writeDouble(double v) |
void |
writeFloat(float v) |
void |
writeInt(int v) |
void |
writeLong(long v) |
void |
writeShort(int v) |
void |
writeShort(short v) |
void |
writeUnsignedInt(long v) |
void |
writeUnsignedShort(int v) |
void |
writeUTF(java.lang.String s) |
public WavRandomAccessFile(java.io.File file,
java.lang.String mode)
throws java.io.FileNotFoundException
file - mode - java.io.FileNotFoundExceptionRandomAccessFile.RandomAccessFile(File, String)public WavRandomAccessFile(java.lang.String name,
java.lang.String mode)
throws java.io.FileNotFoundException
name - mode - java.io.FileNotFoundExceptionRandomAccessFile.RandomAccessFile(String, String)public int read(byte[] b)
throws java.io.IOException
b - java.io.IOExceptionRandomAccessFile.read(byte[])public boolean readBoolean()
throws java.io.IOException
readBoolean in interface java.io.DataInputjava.io.IOExceptionpublic byte readByte()
throws java.io.IOException
readByte in interface java.io.DataInputjava.io.IOExceptionpublic char readChar()
throws java.io.IOException
readChar in interface java.io.DataInputjava.io.IOExceptionpublic double readDouble()
throws java.io.IOException
readDouble in interface java.io.DataInputjava.io.IOExceptionpublic float readFloat()
throws java.io.IOException
readFloat in interface java.io.DataInputjava.io.IOExceptionpublic void readFully(byte[] b)
throws java.io.IOException
readFully in interface java.io.DataInputjava.io.IOExceptionpublic void readFully(byte[] b,
int off,
int len)
throws java.io.IOException
readFully in interface java.io.DataInputjava.io.IOExceptionpublic int readInt()
throws java.io.IOException
readInt in interface java.io.DataInputjava.io.IOExceptionpublic java.lang.String readLine()
throws java.io.IOException
readLine in interface java.io.DataInputjava.io.IOExceptionpublic long readLong()
throws java.io.IOException
readLong in interface java.io.DataInputjava.io.IOExceptionpublic short readShort()
throws java.io.IOException
readShort in interface java.io.DataInputjava.io.IOExceptionpublic java.lang.String readUTF()
throws java.io.IOException
readUTF in interface java.io.DataInputjava.io.IOExceptionpublic int readUnsignedByte()
throws java.io.IOException
readUnsignedByte in interface java.io.DataInputjava.io.IOExceptionpublic int readUnsignedShort()
throws java.io.IOException
readUnsignedShort in interface java.io.DataInputjava.io.IOExceptionpublic long readUnsignedInt()
throws java.io.IOException
java.io.IOExceptionpublic int skipBytes(int n)
throws java.io.IOException
skipBytes in interface java.io.DataInputjava.io.IOExceptionpublic void write(int b)
throws java.io.IOException
write in interface java.io.DataOutputjava.io.IOExceptionpublic void write(byte[] b)
throws java.io.IOException
write in interface java.io.DataOutputjava.io.IOExceptionpublic void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in interface java.io.DataOutputjava.io.IOExceptionpublic void writeBoolean(boolean v)
throws java.io.IOException
writeBoolean in interface java.io.DataOutputjava.io.IOExceptionpublic void writeByte(int v)
throws java.io.IOException
writeByte in interface java.io.DataOutputjava.io.IOExceptionpublic void writeBytes(java.lang.String s)
throws java.io.IOException
writeBytes in interface java.io.DataOutputjava.io.IOExceptionpublic void writeChar(int v)
throws java.io.IOException
writeChar in interface java.io.DataOutputjava.io.IOExceptionpublic void writeChars(java.lang.String s)
throws java.io.IOException
writeChars in interface java.io.DataOutputjava.io.IOExceptionpublic void writeDouble(double v)
throws java.io.IOException
writeDouble in interface java.io.DataOutputjava.io.IOExceptionpublic void writeFloat(float v)
throws java.io.IOException
writeFloat in interface java.io.DataOutputjava.io.IOExceptionpublic void writeInt(int v)
throws java.io.IOException
writeInt in interface java.io.DataOutputjava.io.IOExceptionpublic void writeLong(long v)
throws java.io.IOException
writeLong in interface java.io.DataOutputjava.io.IOExceptionpublic void writeShort(int v)
throws java.io.IOException
writeShort in interface java.io.DataOutputjava.io.IOExceptionpublic void writeShort(short v)
throws java.io.IOException
v - java.io.IOExceptionRandomAccessFile.writeShort(int)public void writeUnsignedShort(int v)
throws java.io.IOException
v - java.io.IOExceptionpublic void writeUnsignedInt(long v)
throws java.io.IOException
v - java.io.IOExceptionpublic void writeUTF(java.lang.String s)
throws java.io.IOException
writeUTF in interface java.io.DataOutputjava.io.IOExceptionpublic long length()
throws java.io.IOException
java.io.IOExceptionRandomAccessFile.length()public final java.nio.channels.FileChannel getChannel()
RandomAccessFile.getChannel()public long getFilePointer()
throws java.io.IOException
java.io.IOExceptionRandomAccessFile.getFilePointer()public void seek(long pos)
throws java.io.IOException
pos - java.io.IOExceptionRandomAccessFile.seek(long)public java.io.RandomAccessFile getRandomAccessFile()
throws java.io.IOException
java.io.IOExceptionpublic void blockAlign()
throws java.io.IOException
java.io.IOExceptionpublic void writeBlockAlign()
throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
java.io.IOExceptionRandomAccessFile.close()