src/main/java/org/java_websocket/server/WebSocketServer.java
private void fillFrames(Draft draft, Map<Draft, List<Framedata>> draftFrames, String sData, ByteBuffer bData) {
		if( !draftFrames.containsKey( draft ) ) {
			List<Framedata> frames = null;
			if (sData != null) {
				frames = draft.createFrames( sData, false );
			}
			if (bData != null) {
				frames = draft.createFrames( bData, false );
			}
			if (frames != null) {
				draftFrames.put(draft, frames);
			}
		}
	}
private void fillFrames(Draft draft, Map<Draft, List<Framedata>> draftFrames, String sData, ByteBuffer bData) {
		if( !draftFrames.containsKey( draft ) ) {
			List<Framedata> frames = null;
			if (sData != null) {
				frames = draft.createFrames( sData, false );
			}
			if (bData != null) {
				frames = draft.createFrames( bData, false );
			}
			if (frames != null) {
				draftFrames.put(draft, frames);
			}
		}
	}
private void fillFrames ( Draft draft , Map < Draft , List < Framedata > > draftFrames , String sData , ByteBuffer bData ) { if ( ! draftFrames . containsKey ( draft ) ) { List < Framedata > frames = null ; if ( sData != null ) { frames = draft . createFrames ( sData , false ) ; } if ( bData != null ) { frames = draft . createFrames ( bData , false ) ; } if ( frames != null ) { draftFrames . put ( draft , frames ) ; } } }
Fills the draftFrames with new data for the broadcast
@param draft The draft to use
@param draftFrames The list of frames per draft to fill
@param sData the string data, can be null
@param bData the bytebuffer data, can be null
Fills the draftFrames with new data for the broadcast