code: private static int readDataBlock(String text, int offset, int length, List<byte[]> blocks)
     {
        int bytes = length / 2;
        byte[] data = new byte[bytes];
  
        for (int index = 0; index < bytes; index++)
        {
           data[index] = (byte) Integer.parseInt(text.substring(offset, offset + 2), 16);
           offset += 2;
        }
  
        blocks.add(data);
        return (offset);
     }
docs: Reads a data block and adds it to the list of blocks.
  
  @param text RTF data
  @param offset current offset
  @param length next block length
  @param blocks list of blocks
  @return next offset