public class Encoder
extends java.lang.Thread
Constructor and Description |
---|
Encoder()
Encoder class constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
encode(java.io.InputStream input,
java.lang.String output_file)
Encode the specified InputStream.
|
void |
encode(java.lang.String input_file,
java.lang.String output_file)
Encode the specified file.
|
byte[] |
getFrame()
return frame containing GSM compression
|
byte[] |
process(short[] data)
Takes an array of shorts and returns a byte array containing the GSM encoded data.
|
void |
setInputData(int[] data)
Sets the input signal to the array specified.
|
static void |
stripAUHeader(java.io.InputStream in)
Remove the header info from the stream and verifies the file type.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public void setInputData(int[] data)
public byte[] getFrame()
public final byte[] process(short[] data)
public static void stripAUHeader(java.io.InputStream in) throws java.lang.Exception
in
- Strip the header from a Sun/Next formated sound stream.java.lang.Exception
public void encode(java.lang.String input_file, java.lang.String output_file) throws java.lang.Exception
stripAUHeader
method for you.input_file
- The name of the file to encode.output_file
- The name of the GSM encoded file.java.lang.Exception
public void encode(java.io.InputStream input, java.lang.String output_file) throws java.io.IOException
input
- The stream to encode.output_file
- The name of the GSM encoded file.java.io.IOException