public class GKMultiplexer
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
COMMAND_CHANNEL |
static int |
DATA_CHANNEL |
static int |
MAXIMUM_PAYLOAD_SIZE |
static java.lang.String |
TAG |
| Constructor and Description |
|---|
GKMultiplexer(java.io.InputStream inputStream,
java.io.OutputStream outputStream) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup() |
byte[] |
readCommandChannelLine() |
byte[] |
readDataChannelToFile(java.io.File dataFile)
Read from the data channel and write it to the specified file.
|
void |
writeToCommandChannel(byte[] data) |
void |
writeToDataChannel(byte[] data) |
void |
writeToDataChannel(java.io.InputStream inputStream) |
public static final java.lang.String TAG
public static final int MAXIMUM_PAYLOAD_SIZE
public static final int COMMAND_CHANNEL
public static final int DATA_CHANNEL
public GKMultiplexer(java.io.InputStream inputStream,
java.io.OutputStream outputStream)
public void writeToCommandChannel(byte[] data)
throws java.io.IOException
java.io.IOExceptionpublic void writeToDataChannel(byte[] data)
throws java.io.IOException
java.io.IOExceptionpublic void writeToDataChannel(java.io.InputStream inputStream)
throws java.io.IOException,
java.lang.InterruptedException
java.io.IOExceptionjava.lang.InterruptedExceptionpublic byte[] readCommandChannelLine()
throws java.io.IOException
java.io.IOExceptionpublic byte[] readDataChannelToFile(java.io.File dataFile)
throws java.io.IOException
dataFile - the File to write the data channel tojava.io.IOException - when connection to the card is disrupted or writing data to a file failspublic void cleanup()