You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@labs.apache.org by th...@apache.org on 2008/06/06 14:23:04 UTC
svn commit: r663911 - in
/labs/droids/trunk/src/core/java/org/apache/droids/helper: Loggable.java
StAX.java Streams.java
Author: thorsten
Date: Fri Jun 6 05:23:04 2008
New Revision: 663911
URL: http://svn.apache.org/viewvc?rev=663911&view=rev
Log:
white noise - formating changes
Modified:
labs/droids/trunk/src/core/java/org/apache/droids/helper/Loggable.java
labs/droids/trunk/src/core/java/org/apache/droids/helper/StAX.java
labs/droids/trunk/src/core/java/org/apache/droids/helper/Streams.java
Modified: labs/droids/trunk/src/core/java/org/apache/droids/helper/Loggable.java
URL: http://svn.apache.org/viewvc/labs/droids/trunk/src/core/java/org/apache/droids/helper/Loggable.java?rev=663911&r1=663910&r2=663911&view=diff
==============================================================================
--- labs/droids/trunk/src/core/java/org/apache/droids/helper/Loggable.java (original)
+++ labs/droids/trunk/src/core/java/org/apache/droids/helper/Loggable.java Fri Jun 6 05:23:04 2008
@@ -19,7 +19,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-
/**
* Simple wrapper class to easier debug/log.
*
@@ -28,7 +27,8 @@
*/
public class Loggable {
- protected final Log log = LogFactory.getLog(this.getClass().getCanonicalName());
+ protected final Log log = LogFactory.getLog(this.getClass()
+ .getCanonicalName());
protected Loggable() {
}
Modified: labs/droids/trunk/src/core/java/org/apache/droids/helper/StAX.java
URL: http://svn.apache.org/viewvc/labs/droids/trunk/src/core/java/org/apache/droids/helper/StAX.java?rev=663911&r1=663910&r2=663911&view=diff
==============================================================================
--- labs/droids/trunk/src/core/java/org/apache/droids/helper/StAX.java (original)
+++ labs/droids/trunk/src/core/java/org/apache/droids/helper/StAX.java Fri Jun 6 05:23:04 2008
@@ -30,69 +30,88 @@
/**
* Helper class that eases the usage of StAX in your plugins.
+ *
* @author thorsten
* @version 1.0
- *
+ *
*/
public class StAX extends Loggable {
- private XMLOutputFactory outputFactory=null;
+ private XMLOutputFactory outputFactory = null;
- private XMLEventFactory eventFactory=null;
+ private XMLEventFactory eventFactory = null;
+
+ private XMLInputFactory inputFactory = null;
- private XMLInputFactory inputFactory=null;
/**
- * Easy helper to get StAX based parser and writer.
+ * Easy helper to get StAX based parser and writer.
*/
- public StAX(){
- inputFactory = XMLInputFactory.newInstance();
- outputFactory=XMLOutputFactory.newInstance();
+ public StAX() {
+ inputFactory = XMLInputFactory.newInstance();
+ outputFactory = XMLOutputFactory.newInstance();
eventFactory = XMLEventFactory.newInstance();
}
+
/**
* Get an event writer based on the incoming stream
- * @param stream the stream we want to write to
+ *
+ * @param stream
+ * the stream we want to write to
* @return ready to use event writer
* @throws XMLStreamException
*/
- public XMLEventWriter getWriter(OutputStream stream) throws XMLStreamException{
+ public XMLEventWriter getWriter(OutputStream stream)
+ throws XMLStreamException {
XMLEventWriter writer = outputFactory.createXMLEventWriter(stream);
return writer;
}
+
/**
- * Get a stream writer based on the incoming stream
- * @param stream the stream we want to write to
+ * Get a stream writer based on the incoming stream
+ *
+ * @param stream
+ * the stream we want to write to
* @return ready to use stream writer
* @throws XMLStreamException
*/
- public XMLStreamWriter getStreamWriter(OutputStream stream) throws XMLStreamException{
+ public XMLStreamWriter getStreamWriter(OutputStream stream)
+ throws XMLStreamException {
XMLStreamWriter writer = outputFactory.createXMLStreamWriter(stream);
return writer;
}
+
/**
* Get an event Parser based on the incoming stream
- * @param in the stream we want to read from
+ *
+ * @param in
+ * the stream we want to read from
* @return ready to use event parser
* @throws XMLStreamException
*/
- public XMLEventReader getEventParser(InputStream in) throws XMLStreamException{
+ public XMLEventReader getEventParser(InputStream in)
+ throws XMLStreamException {
XMLEventReader parser = inputFactory.createXMLEventReader(in);
return parser;
}
+
/**
* Get a stream Parser based on the incoming stream
- * @param in the stream we want to read from
+ *
+ * @param in
+ * the stream we want to read from
* @return ready to use stream parser
* @throws XMLStreamException
*/
- public XMLStreamReader getParser(InputStream in) throws XMLStreamException{
+ public XMLStreamReader getParser(InputStream in) throws XMLStreamException {
XMLStreamReader parser = inputFactory.createXMLStreamReader(in);
return parser;
}
+
/**
* Get the ready to used EventFactory
+ *
* @return ready to used EventFactory
*/
- public XMLEventFactory getEventFactory(){
+ public XMLEventFactory getEventFactory() {
return eventFactory;
}
}
Modified: labs/droids/trunk/src/core/java/org/apache/droids/helper/Streams.java
URL: http://svn.apache.org/viewvc/labs/droids/trunk/src/core/java/org/apache/droids/helper/Streams.java?rev=663911&r1=663910&r2=663911&view=diff
==============================================================================
--- labs/droids/trunk/src/core/java/org/apache/droids/helper/Streams.java (original)
+++ labs/droids/trunk/src/core/java/org/apache/droids/helper/Streams.java Fri Jun 6 05:23:04 2008
@@ -23,16 +23,18 @@
import java.io.InputStream;
/**
- * Helper class for the low level treatment of bytes and streams.
- * Principal usage is to receive a copy of an input stream.
+ * Helper class for the low level treatment of bytes and streams. Principal
+ * usage is to receive a copy of an input stream.
+ *
* @author thorsten
* @version 1.0
- *
+ *
*/
public class Streams {
- private Streams(){
-
+ private Streams() {
+
}
+
private static final int BUFFER_SIZE = 2048;
/**
@@ -41,11 +43,11 @@
* <p>
*
* @param in
- * the input stream to read the bytes from
+ * the input stream to read the bytes from
* @return the byte content of the input stream
*
* @throws IOException
- * in case of errors in the underlying java.io methods used
+ * in case of errors in the underlying java.io methods used
*/
public static byte[] streamCopy(InputStream in) throws IOException {
@@ -78,14 +80,14 @@
* <p>
*
* @param in
- * the input stream to read the bytes from
+ * the input stream to read the bytes from
* @param size
- * the number of bytes to read
+ * the number of bytes to read
*
* @return the byte content read from the input stream
*
* @throws IOException
- * in case of errors in the underlying java.io methods used
+ * in case of errors in the underlying java.io methods used
*/
public static byte[] streamCopy(InputStream in, int size) throws IOException {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org