question: void generateBarcodeLogic ( String msg , int errorCorrectionLevel ) throws WriterException { int errorCorrectionCodeWords = PDF417ErrorCorrection . getErrorCorrectionCodewordCount ( errorCorrectionLevel ) ; String highLevel = PDF417HighLevelEncoder . encodeHighLevel ( msg , compaction ) ; int sourceCodeWords = highLevel . length ( ) ; int [ ] dimension = determineDimensions ( sourceCodeWords , errorCorrectionCodeWords ) ; int cols = dimension [ 0 ] ; int rows = dimension [ 1 ] ; int pad = getNumberOfPadCodewords ( sourceCodeWords , errorCorrectionCodeWords , cols , rows ) ; if ( sourceCodeWords + errorCorrectionCodeWords + 1 > 929 ) { throw new WriterException ( "Encoded message contains to many code words, message to big (" + msg . length ( ) + " bytes)" ) ; } int n = sourceCodeWords + pad + 1 ; StringBuilder sb = new StringBuilder ( n ) ; sb . append ( ( char ) n ) ; sb . append ( highLevel ) ; for ( int i = 0 ; i < pad ; i ++ ) { sb . append ( ( char ) 900 ) ; } String dataCodewords = sb . toString ( ) ; String ec = PDF417ErrorCorrection . generateErrorCorrection ( dataCodewords , errorCorrectionLevel ) ; String fullCodewords = dataCodewords + ec ; barcodeMatrix = new BarcodeMatrix ( rows , cols ) ; encodeLowLevel ( fullCodewords , cols , rows , errorCorrectionLevel , barcodeMatrix ) ; }
target:  Generates the barcode logic.