<p>is there an easy way to transform HTML into markdown with JAVA?</p>

<p>I am currently using the Java <strong><a href="http://code.google.com/p/markdownj/" rel="noreferrer">MarkdownJ</a></strong> library to transform markdown to html.</p>

<pre><code>import com.petebevin.markdown.MarkdownProcessor;
...
public static String getHTML(String markdown) {
    MarkdownProcessor markdown_processor = new MarkdownProcessor();
    return markdown_processor.markdown(markdown);
}

public static String getMarkdown(String html) {
/* TODO Ask stackoverflow */
}
</code></pre>

I am working on the same issue, and experimenting with a couple different techniques.
The answer above could work. You could use the
jTidy library
to do the initial cleanup work and convert from HTML to XHTML. You use the
XSLT stylesheet
linked above.
Unfortunately there is no library that has a one-stop function to do this in Java. You could try using the Python script
html2text
with Jython, but I haven't yet tried this!