JdwpHandshake
public
class
JdwpHandshake
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.device.server.jdwp.JdwpHandshake |
Summary
Constants | |
|---|---|
int |
HANDSHAKE_BAD
|
int |
HANDSHAKE_GOOD
|
int |
HANDSHAKE_NOTYET
|
Fields | |
|---|---|
public
static
final
int |
HANDSHAKE_LEN
|
Public constructors | |
|---|---|
JdwpHandshake()
|
|
Public methods | |
|---|---|
static
void
|
consumeHandshake(ByteBuffer buf)
Remove the handshake string from the buffer. |
static
int
|
findHandshake(ByteBuffer buf)
Like findPacket(), but when we're expecting the JDWP handshake. |
static
void
|
putHandshake(ByteBuffer buf)
Copy the handshake string into the output buffer. |
Constants
HANDSHAKE_BAD
public static final int HANDSHAKE_BAD
Constant Value: 3 (0x00000003)
HANDSHAKE_GOOD
public static final int HANDSHAKE_GOOD
Constant Value: 1 (0x00000001)
HANDSHAKE_NOTYET
public static final int HANDSHAKE_NOTYET
Constant Value: 2 (0x00000002)
Fields
HANDSHAKE_LEN
public static final int HANDSHAKE_LEN
Public constructors
JdwpHandshake
public JdwpHandshake ()
Public methods
consumeHandshake
public static void consumeHandshake (ByteBuffer buf)
Remove the handshake string from the buffer.
On entry and exit, "position" is the #of bytes in the buffer.
| Parameters | |
|---|---|
buf |
ByteBuffer |
findHandshake
public static int findHandshake (ByteBuffer buf)
Like findPacket(), but when we're expecting the JDWP handshake.
Returns one of: HANDSHAKE_GOOD - found handshake, looks good HANDSHAKE_BAD - found enough data, but it's wrong HANDSHAKE_NOTYET - not enough data has been read yet
| Parameters | |
|---|---|
buf |
ByteBuffer |
| Returns | |
|---|---|
int |
|
putHandshake
public static void putHandshake (ByteBuffer buf)
Copy the handshake string into the output buffer.
On exit, "buf"s position will be advanced.
| Parameters | |
|---|---|
buf |
ByteBuffer |