question: protected static String drainInboundMessageBuffer ( StringBuilder builder , int index ) { String result = builder . substring ( 0 , index ) ; builder . delete ( 0 , index ) ; return result ; }
target:  Removes characters 0-index from inboundMessageBuffer and returns the string removed.