Normalize code.

This commit is contained in:
Christian P. MOMON 2014-12-01 16:12:03 +01:00
parent fe8b31c56f
commit a6c5afe319

View file

@ -48,13 +48,13 @@ import org.xml.sax.SAXException;
*/ */
public class XidynUtils public class XidynUtils
{ {
static private final Logger logger = LoggerFactory.getLogger(XidynUtils.class); private static final Logger logger = LoggerFactory.getLogger(XidynUtils.class);
private static final Pattern BODY_PATTERN = Pattern.compile("(?s)^.*<[bB][oO][dD][yY]>\\s*(\\S.*\\S)\\s*</[bB][oO][dD][yY]>.*$"); private static final Pattern BODY_PATTERN = Pattern.compile("(?s)^.*<[bB][oO][dD][yY]>\\s*(\\S.*\\S)\\s*</[bB][oO][dD][yY]>.*$");
/** /**
* This method adds a tag to a DOM object. * This method adds a tag to a DOM object.
*/ */
static public void addMetaTag(final Document doc, final String name, final String content) public static void addMetaTag(final Document doc, final String name, final String content)
{ {
// Find head tag. // Find head tag.
Node headNode = findHeadNode(doc); Node headNode = findHeadNode(doc);
@ -79,7 +79,7 @@ public class XidynUtils
/** /**
* This method builds a DOM object from a source. * This method builds a DOM object from a source.
*/ */
static public Document buildDom(final InputStream source) throws Exception public static Document buildDom(final InputStream source) throws Exception
{ {
Document result; Document result;
@ -151,7 +151,7 @@ public class XidynUtils
/** /**
* This method builds a DOM object from a source. * This method builds a DOM object from a source.
*/ */
static public Document buildDom(final String source) throws Exception public static Document buildDom(final String source) throws Exception
{ {
Document result; Document result;
@ -251,7 +251,7 @@ public class XidynUtils
/** /**
* *
*/ */
static public String extractBodyContent(final CharSequence source) public static String extractBodyContent(final CharSequence source)
{ {
String result; String result;
@ -302,7 +302,7 @@ public class XidynUtils
* @return the string before the <i>html</i> tag or null if no <i>html</i> * @return the string before the <i>html</i> tag or null if no <i>html</i>
* tag found. So, "" if there is a <i>html</i> tag without doctype. * tag found. So, "" if there is a <i>html</i> tag without doctype.
*/ */
static public String extractDoctype(final String source) public static String extractDoctype(final String source)
{ {
String result; String result;
@ -366,7 +366,7 @@ public class XidynUtils
/** /**
* *
*/ */
static public Document fileToDom(final File source) throws Exception public static Document fileToDom(final File source) throws Exception
{ {
Document result; Document result;
@ -485,7 +485,7 @@ public class XidynUtils
* @return * @return
* @throws IOException * @throws IOException
*/ */
static public String load(final File source) throws IOException public static String load(final File source) throws IOException
{ {
String result; String result;
@ -517,7 +517,7 @@ public class XidynUtils
* @return * @return
* @throws IOException * @throws IOException
*/ */
static public String load(final URL source) throws IOException public static String load(final URL source) throws IOException
{ {
String result; String result;
@ -651,7 +651,7 @@ public class XidynUtils
* String that is to have the entities restored.. * String that is to have the entities restored..
* @return The processed string. * @return The processed string.
*/ */
static public String restoreEntities(final StringBuffer source) public static String restoreEntities(final StringBuffer source)
{ {
String result; String result;
@ -703,7 +703,7 @@ public class XidynUtils
/** /**
* *
*/ */
static public Document urlToDom(final URL source) throws Exception public static Document urlToDom(final URL source) throws Exception
{ {
Document result; Document result;