public void writePadding(int length,int padByte) throws IOException {
  final byte[] padding;
  if (padByte == SPACE_BYTE && length <= TEXT_PAD.length) {
    padding=TEXT_PAD;
  }
 else   if (padByte == NULL_BYTE && length <= ZERO_PADDING.length) {
    padding=ZERO_PADDING;
  }
 else {
    padding=new byte[length];
    if (padByte != NULL_BYTE) {
      Arrays.fill(padding,(byte)padByte);
    }
  }
  out.write(padding,0,length);
}

public void writePadding ( int length , int padByte ) throws IOException { final byte [ ] padding ; if ( padByte == SPACE_BYTE && length <= TEXT_PAD . length ) { padding = TEXT_PAD ; } else if ( padByte == NULL_BYTE && length <= ZERO_PADDING . length ) { padding = ZERO_PADDING ; } else { padding = new byte [ length ] ; if ( padByte != NULL_BYTE ) { Arrays . fill ( padding , ( byte ) padByte ) ; } } out . write ( padding , 0 , length ) ; }
writes padding for the specified length of the specified padding byte .
