code: public static String encodeLines(final byte[] input, final int iOff, final int iLen, final int lineLen,
             final String lineSeparator) {
         final int blockLen = (lineLen * CONSTANT_3) / CONSTANT_4;
         if (blockLen <= 0) {
             throw new IllegalArgumentException();
         }
         final int lines = (iLen + blockLen - 1) / blockLen;
         final int bufLen = ((iLen + 2) / CONSTANT_3) * CONSTANT_4 + lines * lineSeparator.length();
         final StringBuilder buf = new StringBuilder(bufLen);
         int ipValue = 0;
         while (ipValue < iLen) {
             final int length = Math.min(iLen - ipValue, blockLen);
             buf.append(encode(input, iOff + ipValue, length));
             buf.append(lineSeparator);
             ipValue += length;
         }
         return buf.toString();
     }
docs: Encode lines.
  
  @param input the input
  @param iOff the i off
  @param iLen the i len
  @param lineLen the line len
  @param lineSeparator the line separator
  @return the string