

Classes | |
| class | OutputWriterThread |
Public Member Functions | |
| DataPumper (final String host, final int port, final Handler useme) | |
| final void | sendData (final byte[] data) |
| final void | init () |
| final void | sendWarning (final String str) |
| final void | run () |
| final void | interruptSocket () |
| final void | corruptMe () |
| final boolean | isConnected () |
| final void | closeSocket () |
| final Handler | getHandler () |
Static Public Member Functions | |
| static String | toHex (final byte[] bytes) |
Static Public Attributes | |
| static final int | MESSAGE_RETRIEVE = 100 |
| static final int | MESSAGE_END = 102 |
| static final int | MESSAGE_INITXFER = 103 |
| static final int | MESSAGE_ENDXFER = 104 |
| static final int | MESSAGE_COMPRESS = 105 |
| static final int | MESSAGE_NOCOMPRESS = 106 |
| static final int | MESSAGE_THROTTLE = 108 |
| static final int | MESSAGE_NOTHROTTLE = 109 |
Data pumper thread implementation. This object manages itself as a thread, as well as a child thread process to write output data to.
| com.offsetnull.bt.service.DataPumper.DataPumper | ( | final String | host, |
| final int | port, | ||
| final Handler | useme | ||
| ) |
Generic constructor.
| host | Host name for the connection. |
| port | Port number to use. |
| useme | Handler to report to when interesting things happen. |
| final void com.offsetnull.bt.service.DataPumper.closeSocket | ( | ) |
Utility method to close the socket, including the reader and writer threads.
| final void com.offsetnull.bt.service.DataPumper.corruptMe | ( | ) |
Utility function to corrup the MCCP stream.
| final Handler com.offsetnull.bt.service.DataPumper.getHandler | ( | ) |
Getter for mHandler.
| final void com.offsetnull.bt.service.DataPumper.init | ( | ) |
Startup and initialization routine.

| final void com.offsetnull.bt.service.DataPumper.interruptSocket | ( | ) |
Utility method to interrpt a blocked socket.
| final boolean com.offsetnull.bt.service.DataPumper.isConnected | ( | ) |
Utility method to get if the socket is connected.
| final void com.offsetnull.bt.service.DataPumper.run | ( | ) |
| final void com.offsetnull.bt.service.DataPumper.sendData | ( | final byte[] | data | ) |
Sends data to the socket asynchronously.
| data | the bytes to send to the server. |
| final void com.offsetnull.bt.service.DataPumper.sendWarning | ( | final String | str | ) |
Quick little helper method to send off a processor warning.
| str | The processor warning to send. |
|
static |
Utility method to convert byte[] to a hex string.
| bytes | The byte array to convert. |
|
static |
Contant indicating that compression should start.
|
static |
Constant indicating orderly shutdown via user.
|
static |
Constant indicating the end of the data transfer.
|
static |
Constant indicating that data transfer should begin.
|
static |
Constant indicating that compression should end.
|
static |
Constant indicating that throttling should end.
|
static |
Constant indicating the socket polling loop.
|
static |
Constant indicating that throttling should begin.
1.8.3.1