public void writePartialMessageToMessage(Message message,int endIndex){
  int startIndexOfPartialMessage=message.offset + endIndex;
  int lengthOfPartialMessage=(message.offset + message.length) - endIndex;
  System.arraycopy(message.sharedArray,startIndexOfPartialMessage,this.sharedArray,this.offset,lengthOfPartialMessage);
}

public void writePartialMessageToMessage ( Message message , int endIndex ) { int startIndexOfPartialMessage = message . offset + endIndex ; int lengthOfPartialMessage = ( message . offset + message . length ) - endIndex ; System . arraycopy ( message . sharedArray , startIndexOfPartialMessage , this . sharedArray , this . offset , lengthOfPartialMessage ) ; }
in case the buffer backing the nextmessage contains more than one http message , move all data after the first message to a new message object .
