Code example for ByteBuffer

Methods: putInt

     * Pass in the byte buffer returned by JdwpPacket.getPayload(). 
    static void finishChunkPacket(JdwpPacket packet, int type, int chunkLen) {
        ByteBuffer buf = packet.getPayload();
        buf.putInt(0x00, type);
        buf.putInt(0x04, chunkLen);
        packet.finishPacket(CHUNK_HEADER_LEN + chunkLen);
     * Check that the client is opened with the proper debugger port for the 
     * specified application name, and if not, reopen it. 
     * @param client 
     * @param uiThread 
     * @param appName 
     * @return 
    protected static Client checkDebuggerPortForAppName(Client client, String appName) {
        IDebugPortProvider provider = DebugPortManager.getProvider();