private void receiveMessage ( ClientSocket client , DataInputStream buffer , byte from , StateConnection expected ) throws IOException { if ( ServerImpl . checkValidity ( client , from , expected ) ) { final byte dest = buffer . readByte ( ) ; final byte type = buffer . readByte ( ) ; final int size = buffer . readInt ( ) ; if ( size > 0 ) { final byte [ ] clientData = new byte [ size ] ; if ( buffer . read ( clientData ) != - 1 ) // CHECKSTYLE IGNORE LINE: TrailingComment|NestedIfDepth { final DataInputStream clientBuffer = new DataInputStream ( new ByteArrayInputStream ( clientData ) ) ; decodeMessage ( type , from , dest , clientBuffer ) ; } } final int headerSize = 4 ; bandwidth += headerSize + size ; } }
Update the receive standard message state .