You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2014/01/06 17:33:40 UTC
svn commit: r1555900 - in
/uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci: debug/ transport/
transport/context/ transport/document/ transport/util/ transport/vns/client/
Author: schor
Date: Mon Jan 6 16:33:40 2014
New Revision: 1555900
URL: http://svn.apache.org/r1555900
Log:
[UIMA-3484] fixes to javadoc comments only. Mostly replacing > and < and friends with the html entities.
Modified:
uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/debug/FatalException.java
uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/BaseClient.java
uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/BaseServer.java
uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/Frame.java
uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/FrameLeaf.java
uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/LeafCastException.java
uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/ServiceDownException.java
uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/VNSException.java
uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/VinciClient.java
uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/VinciFrame.java
uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/VinciServer.java
uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/XTalkTransporter.java
uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/context/VinciContext.java
uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/document/AFrame.java
uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/document/XMLToVinci.java
uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/document/XMLToXTalk.java
uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/util/Base64Converter.java
uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/util/UTFConverter.java
uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/vns/client/ServeonResult.java
Modified: uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/debug/FatalException.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/debug/FatalException.java?rev=1555900&r1=1555899&r2=1555900&view=diff
==============================================================================
--- uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/debug/FatalException.java (original)
+++ uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/debug/FatalException.java Mon Jan 6 16:33:40 2014
@@ -25,9 +25,7 @@ package org.apache.vinci.debug;
*
*/
public class FatalException extends RuntimeException {
- /**
- *
- */
+
private static final long serialVersionUID = -8889142805115637932L;
private Throwable original_exception;
Modified: uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/BaseClient.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/BaseClient.java?rev=1555900&r1=1555899&r2=1555900&view=diff
==============================================================================
--- uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/BaseClient.java (original)
+++ uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/BaseClient.java Mon Jan 6 16:33:40 2014
@@ -77,8 +77,8 @@ public class BaseClient {
* if the underlying socket fails to connect
*
* @pre h != null
- * @pre p >= 0
- * @pre p < 65536
+ * @pre p ≥ 0
+ * @pre p < 65536
*/
public BaseClient(String h, int p) throws IOException {
this(h, p, VinciFrame.getVinciFrameFactory());
@@ -98,8 +98,8 @@ public class BaseClient {
* if the underlying socket fails to connect
*
* @pre h != null
- * @pre p >= 0
- * @pre p < 65536
+ * @pre p ≥ 0
+ * @pre p < 65536
*/
public BaseClient(String h, int p, int connect_timeout) throws IOException {
this(h, p, VinciFrame.getVinciFrameFactory(), connect_timeout);
@@ -119,8 +119,8 @@ public class BaseClient {
*
* @pre h != null
* @pre f != null
- * @pre p >= 0
- * @pre p < 65536
+ * @pre p ≥ 0
+ * @pre p < 65536
*/
public BaseClient(String h, int p, TransportableFactory f) throws IOException {
this.factory = f;
@@ -145,9 +145,9 @@ public class BaseClient {
*
* @pre h != null
* @pre f != null
- * @pre p >= 0
- * @pre p < 65536
- * @pre timeout > 0
+ * @pre p ≥ 0
+ * @pre p < 65536
+ * @pre timeout > 0
*/
public BaseClient(String h, int p, TransportableFactory f, int timeout) throws IOException {
this.factory = f;
@@ -533,8 +533,8 @@ public class BaseClient {
*
* @pre host_name != null
* @pre f != null
- * @pre p >= 0
- * @pre p < 65536
+ * @pre p ≥ 0
+ * @pre p < 65536
*/
static public Transportable sendAndReceive(Transportable in, String host_name, int p,
TransportableFactory f) throws IOException, ServiceException {
@@ -553,8 +553,8 @@ public class BaseClient {
* @pre in != null
* @pre host_name != null
* @pre f != null
- * @pre p >= 0
- * @pre p < 65536
+ * @pre p ≥ 0
+ * @pre p < 65536
*/
static public Transportable sendAndReceive(Transportable in, String host_name, int p,
TransportableFactory f, int socket_timeout) throws IOException, ServiceException {
@@ -575,8 +575,8 @@ public class BaseClient {
* @pre in != null
* @pre host_name != null
* @pre f != null
- * @pre p >= 0
- * @pre p < 65536
+ * @pre p ≥ 0
+ * @pre p < 65536
*/
static public Transportable sendAndReceive(Transportable in, String host_name, int p,
TransportableFactory f, int socket_timeout, int connect_timeout) throws IOException,
@@ -597,8 +597,8 @@ public class BaseClient {
*
* @pre in != null
* @pre host_name != null
- * @pre p >= 0
- * @pre p < 65536
+ * @pre p ≥ 0
+ * @pre p < 65536
*/
static public VinciFrame rpc(Transportable in, String host_name, int p) throws IOException,
ServiceException {
@@ -611,8 +611,8 @@ public class BaseClient {
*
* @pre host_name != null
* @pre in != null
- * @pre p >= 0
- * @pre p < 65536
+ * @pre p ≥ 0
+ * @pre p < 65536
*/
static public VinciFrame rpc(Transportable in, String host_name, int p, int socket_timeout)
throws IOException, ServiceException {
@@ -626,8 +626,8 @@ public class BaseClient {
*
* @pre host_name != null
* @pre in != null
- * @pre p >= 0
- * @pre p < 65536
+ * @pre p ≥ 0
+ * @pre p < 65536
*/
static public VinciFrame rpc(Transportable in, String host_name, int p, int socket_timeout,
int connect_timeout) throws IOException, ServiceException {
@@ -693,8 +693,8 @@ public class BaseClient {
* Thrown by underlying Socket open() call.
*
* @pre h != null
- * @pre p >= 0
- * @pre p < 65536
+ * @pre p ≥ 0
+ * @pre p < 65536
*/
protected final void open(String h, int p) throws IOException {
this.host = h;
Modified: uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/BaseServer.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/BaseServer.java?rev=1555900&r1=1555899&r2=1555900&view=diff
==============================================================================
--- uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/BaseServer.java (original)
+++ uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/BaseServer.java Mon Jan 6 16:33:40 2014
@@ -254,8 +254,8 @@ public class BaseServer {
* The port on which to listen for requests.
* @exception IOException
* Thrown if there was some problem with the server socket.
- * @pre port >= 0
- * @pre port < 65536
+ * @pre port ≥ 0
+ * @pre port < 65536
* @since 2.0.15
*/
public void startServing(int port) throws IOException {
@@ -281,8 +281,8 @@ public class BaseServer {
* The port on which to listen for requests.
* @exception IOException
* Thrown if there was some problem with the server socket.
- * @pre port >= 0
- * @pre port < 65536
+ * @pre port ≥ 0
+ * @pre port < 65536
*/
public void serve(int port) throws IOException {
configureServerSocket(port);
@@ -313,8 +313,8 @@ public class BaseServer {
* @return The server socket to be used by this server for accepting requests.
* @param port
* The port which is to be listened to by the created socket.
- * @pre port >= 0
- * @pre port < 65536
+ * @pre port ≥ 0
+ * @pre port < 65536
*/
protected ServerSocket createServerSocket(int port) throws IOException {
ServerSocket s = new ServerSocket(port);
Modified: uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/Frame.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/Frame.java?rev=1555900&r1=1555899&r2=1555900&view=diff
==============================================================================
--- uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/Frame.java (original)
+++ uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/Frame.java Mon Jan 6 16:33:40 2014
@@ -94,7 +94,7 @@ public abstract class Frame extends Fram
* The tag name with which to associate the value.
* @param val
* The (Frame | FrameLeaf) value to associate with the tag.
- * @throws UnsupportedOperationException
+ * @throws UnsupportedOperationException not implemented
*/
/* abstract */public void add(String tag, FrameComponent val) {
throw new UnsupportedOperationException("not implemented");
@@ -111,7 +111,7 @@ public abstract class Frame extends Fram
*
* @param which
* The index of the KeyValuePair to retrieve.
- * @throws UnsupportedOperationException
+ * @throws UnsupportedOperationException not implemented
* @return The requested KeyValuePair.
*/
/* abstract */public KeyValuePair getKeyValuePair(int which) {
@@ -126,7 +126,7 @@ public abstract class Frame extends Fram
* define it in cases where alternative getters are provided for querying the document, and the
* object is never marshalled to a stream.
*
- * @throws UnsupportedOperationException
+ * @throws UnsupportedOperationException not implemented
* @return The total number of key/value pairs in this frame.
*/
/* abstract */public int getKeyValuePairCount() {
@@ -295,7 +295,7 @@ public abstract class Frame extends Fram
* @return the created sub-frame.
*
* @pre tag_name != null
- * @pre initialCapacity >= 0
+ * @pre initialCapacity ≥ 0
*/
public Frame createSubFrame(String tag_name, int initialCapacity) {
try {
@@ -335,7 +335,7 @@ public abstract class Frame extends Fram
* Helper method for toXML(StringBuffer).
*
* @pre rval != null
- * @pre offset >= 0
+ * @pre offset ≥ 0
*/
protected void toXML(StringBuffer rval, int offset) {
KeyValuePair keyVal = null;
@@ -555,7 +555,7 @@ public abstract class Frame extends Fram
* @return This frame.
*
* @pre key != null
- * @pre { for (int i = 0; i < val.length; i++) $assert(val[i] != null, "array elements are
+ * @pre { for (int i = 0; i < val.length; i++) $assert(val[i] != null, "array elements are
* non-null"); }
*/
public Frame fadd(String key, String[] val) {
Modified: uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/FrameLeaf.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/FrameLeaf.java?rev=1555900&r1=1555899&r2=1555900&view=diff
==============================================================================
--- uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/FrameLeaf.java (original)
+++ uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/FrameLeaf.java Mon Jan 6 16:33:40 2014
@@ -74,7 +74,7 @@ public class FrameLeaf extends FrameComp
* This method does NOT support null values in the array.
*
* @pre mystring != null
- * @pre { for (int i = 0; i < mystring.length; i++) $assert(mystring[i] != null, "array elements
+ * @pre { for (int i = 0; i < mystring.length; i++) $assert(mystring[i] != null, "array elements
* are non-null"); }
*/
public FrameLeaf(String[] mystring) {
Modified: uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/LeafCastException.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/LeafCastException.java?rev=1555900&r1=1555899&r2=1555900&view=diff
==============================================================================
--- uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/LeafCastException.java (original)
+++ uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/LeafCastException.java Mon Jan 6 16:33:40 2014
@@ -24,9 +24,7 @@ package org.apache.vinci.transport;
* errors.
*/
public class LeafCastException extends IllegalArgumentException {
- /**
- *
- */
+
private static final long serialVersionUID = 2167774897716144428L;
public LeafCastException() {
Modified: uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/ServiceDownException.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/ServiceDownException.java?rev=1555900&r1=1555899&r2=1555900&view=diff
==============================================================================
--- uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/ServiceDownException.java (original)
+++ uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/ServiceDownException.java Mon Jan 6 16:33:40 2014
@@ -26,9 +26,7 @@ import java.io.IOException;
* not be established.
*/
public class ServiceDownException extends IOException {
- /**
- *
- */
+
private static final long serialVersionUID = -6125121845524920235L;
/**
Modified: uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/VNSException.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/VNSException.java?rev=1555900&r1=1555899&r2=1555900&view=diff
==============================================================================
--- uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/VNSException.java (original)
+++ uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/VNSException.java Mon Jan 6 16:33:40 2014
@@ -25,9 +25,7 @@ import java.io.IOException;
* Special exception type thrown by VinciClient/VinciServer when VNS itself reports an error.
*/
public class VNSException extends IOException {
- /**
- *
- */
+
private static final long serialVersionUID = -9150424759390586749L;
public VNSException(String message) {
Modified: uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/VinciClient.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/VinciClient.java?rev=1555900&r1=1555899&r2=1555900&view=diff
==============================================================================
--- uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/VinciClient.java (original)
+++ uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/VinciClient.java Mon Jan 6 16:33:40 2014
@@ -240,7 +240,7 @@ public class VinciClient extends BaseCli
* @pre in != null
* @pre service_name != null
* @pre factory != null
- * @pre socket_timeout >= 0
+ * @pre socket_timeout ≥ 0
*/
static public Transportable sendAndReceive(Transportable in, String service_name,
TransportableFactory factory, int socket_timeout) throws IOException, ServiceException {
@@ -258,7 +258,7 @@ public class VinciClient extends BaseCli
* @pre in != null
* @pre service_name != null
* @pre factory != null
- * @pre socket_timeout >= 0
+ * @pre socket_timeout ≥ 0
*/
static public Transportable sendAndReceive(Transportable in, String service_name,
TransportableFactory factory, int socket_timeout, int connect_timeout)
@@ -482,7 +482,7 @@ public class VinciClient extends BaseCli
*
* @pre in != null
* @pre service_name != null
- * @pre timeout >= 0
+ * @pre timeout ≥ 0
*/
static public VinciFrame rpc(Transportable in, String service_name, int timeout)
throws IOException, ServiceException, ServiceDownException, VNSException {
@@ -500,8 +500,8 @@ public class VinciClient extends BaseCli
*
* @pre in != null
* @pre service_name != null
- * @pre timeout >= 0
- * @pre connect_timeout > 0
+ * @pre timeout ≥ 0
+ * @pre connect_timeout > 0
*/
static public VinciFrame rpc(Transportable in, String service_name, int timeout,
int connect_timeout) throws IOException, ServiceException, ServiceDownException,
Modified: uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/VinciFrame.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/VinciFrame.java?rev=1555900&r1=1555899&r2=1555900&view=diff
==============================================================================
--- uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/VinciFrame.java (original)
+++ uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/VinciFrame.java Mon Jan 6 16:33:40 2014
@@ -76,7 +76,7 @@ public class VinciFrame extends Queryabl
* the capacity value to be passed on to the internal ArrayList used for holding
* KeyValuePairs.
*
- * @pre initialCapacity >= 0
+ * @pre initialCapacity ≥ 0
*/
public VinciFrame(int initialCapacity) {
capacity = initialCapacity;
@@ -131,7 +131,7 @@ public class VinciFrame extends Queryabl
* Override the createSubFrame to create a VinciFrame of precise capacity.
*
* @pre tag_name != null
- * @pre initialCapacity >= 0
+ * @pre initialCapacity ≥ 0
*/
public Frame createSubFrame(String tag_name, int initialCapacity) {
return new VinciFrame(initialCapacity);
@@ -376,8 +376,8 @@ public class VinciFrame extends Queryabl
/**
* Implementation of the abstract Frame method.
*
- * @pre which < getKeyValuePairCount()
- * @pre which >= 0
+ * @pre which < getKeyValuePairCount()
+ * @pre which ≥ 0
*/
public KeyValuePair getKeyValuePair(int which) {
return elements[which];
Modified: uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/VinciServer.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/VinciServer.java?rev=1555900&r1=1555899&r2=1555900&view=diff
==============================================================================
--- uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/VinciServer.java (original)
+++ uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/VinciServer.java Mon Jan 6 16:33:40 2014
@@ -89,8 +89,8 @@ public class VinciServer extends BaseSer
* @pre service_name != null
* @pre host_name != null
* @pre servable != null
- * @pre myPriority >= -1
- * @pre myInstance >= 0
+ * @pre myPriority ≥ -1
+ * @pre myInstance ≥ 0
*/
public VinciServer(String service_name, String host_name, VinciServable servable, int myPriority,
int myInstance) {
@@ -105,7 +105,7 @@ public class VinciServer extends BaseSer
* @pre service_name != null
* @pre host_name != null
* @pre servable != null
- * @pre myPriority >= -1
+ * @pre myPriority ≥ -1
*/
public VinciServer(String service_name, String host_name, VinciServable servable, int myPriority) {
this(service_name, host_name, servable, myPriority, 0);
@@ -114,7 +114,7 @@ public class VinciServer extends BaseSer
/**
* @pre service_name != null
* @pre servable != null
- * @pre myPriority >= -1
+ * @pre myPriority ≥ -1
*/
public VinciServer(String service_name, VinciServable servable, int myPriority)
throws UnknownHostException {
@@ -124,8 +124,8 @@ public class VinciServer extends BaseSer
/**
* @pre service_name != null
* @pre servable != null
- * @pre myPriority >= -1
- * @pre myInstance >= 0
+ * @pre myPriority ≥ -1
+ * @pre myInstance ≥ 0
*/
public VinciServer(String service_name, VinciServable servable, int myPriority, int myInstance)
throws UnknownHostException {
Modified: uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/XTalkTransporter.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/XTalkTransporter.java?rev=1555900&r1=1555899&r2=1555900&view=diff
==============================================================================
--- uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/XTalkTransporter.java (original)
+++ uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/XTalkTransporter.java Mon Jan 6 16:33:40 2014
@@ -49,6 +49,8 @@ public class XTalkTransporter implements
/**
* Parse the data-stream according to the XTalk protocol.
*
+ * @param is input stream
+ * @param f frame
* @return If the first tag belongs to the Vinci namespace, then this tag/value combination is
* returned. Otherwise returns null. Should there be a non-null return, then the value
* object of the KeyValuePair can be either FrameLeaf or Frame.
@@ -73,7 +75,12 @@ public class XTalkTransporter implements
*
* @pre is != null
* @pre f != null
- */
+
+ * @param is input stream
+ * @param f frame
+ * @return the key value pair
+ * @throws IOException if the versions don't match, or have unexpected element marker
+ * */
public KeyValuePair fromStreamWork(InputStream is, Frame f) throws IOException {
return fromStreamWork(is, f, new byte[128], new char[128]);
}
@@ -111,8 +118,8 @@ public class XTalkTransporter implements
/**
*
- * @param is
- * @throws IOException
+ * @param is the input stream
+ * @throws IOException passthru
*
* @pre is != null
*/
@@ -132,8 +139,8 @@ public class XTalkTransporter implements
/**
*
- * @param is
- * @throws IOException
+ * @param is the input stream
+ * @throws IOException passthru
*
* @pre is != null
*/
@@ -144,10 +151,10 @@ public class XTalkTransporter implements
/**
*
- * @param is
- * @param f
+ * @param is the input stream
+ * @param f frame
* @return key value
- * @throws IOException
+ * @throws IOException passthru
*
* @pre is != null
* @pre f != null
@@ -180,10 +187,10 @@ public class XTalkTransporter implements
/**
*
- * @param is
- * @param f
+ * @param is the input stream
+ * @param f the Frame
* @return key value
- * @throws IOException
+ * @throws IOException passthru
*
* @pre is != null
* @pre f != null
@@ -234,11 +241,11 @@ public class XTalkTransporter implements
/**
*
- * @param is
- * @param f
- * @param field_count
- * @param marker
- * @throws IOException
+ * @param is input stream
+ * @param f frame
+ * @param field_count field count
+ * @param marker marker
+ * @throws IOException passthru
*
* @pre is != null
* @pre f != null
@@ -286,8 +293,8 @@ public class XTalkTransporter implements
/**
*
- * @param is
- * @throws IOException
+ * @param is input stream
+ * @throws IOException an EOFException if number to be skipped is bigger than the stream
*
* @pre is != null
*/
@@ -308,8 +315,9 @@ public class XTalkTransporter implements
* Consume a string from the input stream. TODO: Make a faster version that exploits work buffers
* to reduce allocations to a single string object.
*
- * @param is
- * @throws IOException
+ * @param is input stream
+ * @return the string
+ * @throws IOException if key is longer than limit
*
* @pre is != null
*/
@@ -343,6 +351,12 @@ public class XTalkTransporter implements
/**
* Consume the string of bytesToRead utf-8 bytes. assumes buffers are big enough to hold
* bytesToRead bytes/chars
+ * @param is input stream
+ * @param byteBuf a byte buffer
+ * @param charBuf a character buffer
+ * @param bytesToRead the number of bytes to read
+ * @return the length of the converted characters
+ * @throws IOException passthru
*/
static public int consumeCharacters(InputStream is, byte[] byteBuf, char[] charBuf,
int bytesToRead) throws IOException {
@@ -352,9 +366,9 @@ public class XTalkTransporter implements
/**
*
- * @param is
- * @param f
- * @throws IOException
+ * @param is input stream
+ * @param f frame
+ * @throws IOExcetion if the key length is too large
*
* @pre is != null
* @pre f != null
@@ -372,6 +386,9 @@ public class XTalkTransporter implements
public static final byte[] HEADER = { DOCUMENT_MARKER, VERSION_CODE, 0, 0, 0, 1, ELEMENT_MARKER };
/**
+ * @param os output stream
+ * @param f frame
+ * @throws IOException passthru
* @pre os != null
* @pre f != null
*/
@@ -389,11 +406,9 @@ public class XTalkTransporter implements
/**
*
- * @param os
- * @param f
- * @throws IOException
- * @throws UnsupportedOperationException
- * if the frame doesn't support key iteration.
+ * @param os output stream
+ * @param f frame
+ * @throws IOException passthru
*
* @pre os != null
* @pre f != null
@@ -434,6 +449,9 @@ public class XTalkTransporter implements
/**
* Sends a string over, without the type byte.
+ * @param str the string to send
+ * @param os the output stream
+ * @throws IOException passthru
*
* @pre str != null
* @pre os != null
@@ -447,6 +465,10 @@ public class XTalkTransporter implements
/**
* Sends a string as utf8, using the temporary buffer if it is big enough to avoid allocating new
* memory.
+ * @param str the string to send
+ * @param os the output stream
+ * @param buffer a buffer
+ * @throws IOException passthru
*/
static public void stringToBin(String str, OutputStream os, byte[] buffer) throws IOException {
byte[] newbuf;
@@ -494,9 +516,9 @@ public class XTalkTransporter implements
/**
*
- * @param write_me
- * @param out
- * @throws IOException
+ * @param write_me the integer to write
+ * @param out the output stream
+ * @throws IOException passthru
*
* @pre out != null
*/
@@ -509,9 +531,9 @@ public class XTalkTransporter implements
/**
*
- * @param in
+ * @param in the input stream
* @return the integer
- * @throws IOException
+ * @throws IOException if any of the pieces read are negative
*
* @pre in != null
*/
@@ -528,9 +550,9 @@ public class XTalkTransporter implements
/**
*
- * @param b
- * @param in
- * @throws IOException
+ * @param b the byte array to read into
+ * @param in the input stream
+ * @throws IOException passthru
*
* @pre b != null
* @pre in != null
@@ -552,9 +574,10 @@ public class XTalkTransporter implements
/**
*
- * @param os
- * @param attributes
- * @throws IOException
+ * @param os the output stream
+ * @param attributes attributes
+ * @param workbuf a working buffer
+ * @throws IOException passthru
*
* @pre os != null
* @pre attributes != null
Modified: uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/context/VinciContext.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/context/VinciContext.java?rev=1555900&r1=1555899&r2=1555900&view=diff
==============================================================================
--- uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/context/VinciContext.java (original)
+++ uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/context/VinciContext.java Mon Jan 6 16:33:40 2014
@@ -147,8 +147,8 @@ public class VinciContext {
};
/**
- * @pre myport >= 0
- * @pre myport < 65536
+ * @pre myport ≥ 0
+ * @pre myport < 65536
*/
public VinciContext(String myhost, int myport) {
this.host = myhost;
@@ -163,7 +163,7 @@ public class VinciContext {
* System.setProperty("VNS_HOST", [hostname]) before ever invoking any Vinci client code.
* Otherwise, you can set the hostname using the setVNSHost() method provided by this class.
*
- * @throws IllegalStateException
+ * @throws IllegalStateException
* if the VNS host has not been specified.
*/
public String getVNSHost() {
@@ -199,8 +199,8 @@ public class VinciContext {
/**
* Set the VNS port.
*
- * @pre port >= 0
- * @pre port < 65536
+ * @pre port ≥ 0
+ * @pre port < 65536
*/
public void setVNSPort(int p) {
port = p;
@@ -386,7 +386,7 @@ public class VinciContext {
* @pre in != null
* @pre service_name != null
* @pre factory != null
- * @pre socket_timeout >= 0
+ * @pre socket_timeout ≥ 0
*/
public Transportable sendAndReceive(Transportable in, String service_name,
TransportableFactory factory, int socket_timeout) throws IOException, ServiceException {
@@ -413,7 +413,7 @@ public class VinciContext {
* @pre in != null
* @pre service_name != null
* @pre factory != null
- * @pre socket_timeout >= 0
+ * @pre socket_timeout ≥ 0
*/
public Transportable sendAndReceive(Transportable in, String service_name,
TransportableFactory factory, int socket_timeout, int connect_timeout)
@@ -458,7 +458,7 @@ public class VinciContext {
*
* @pre in != null
* @pre service_name != null
- * @pre timeout >= 0
+ * @pre timeout ≥ 0
*/
public VinciFrame rpc(Transportable in, String service_name, int timeout) throws IOException,
ServiceException, ServiceDownException, VNSException {
@@ -484,7 +484,7 @@ public class VinciContext {
*
* @pre in != null
* @pre service_name != null
- * @pre timeout >= 0
+ * @pre timeout ≥ 0
*/
public VinciFrame rpc(Transportable in, String service_name, int socket_timeout,
int connect_timeout) throws IOException, ServiceException, ServiceDownException,
Modified: uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/document/AFrame.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/document/AFrame.java?rev=1555900&r1=1555899&r2=1555900&view=diff
==============================================================================
--- uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/document/AFrame.java (original)
+++ uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/document/AFrame.java Mon Jan 6 16:33:40 2014
@@ -79,7 +79,7 @@ public class AFrame extends VinciFrame {
}
/**
- * @pre capacity >= 0
+ * @pre capacity ≥ 0
*/
public AFrame(int capacity) {
super(capacity);
@@ -98,7 +98,7 @@ public class AFrame extends VinciFrame {
* Override the createSubFrame to create an AFrame of precise capacity.
*
* @pre tag_name != null
- * @pre initialCapacity >= 0
+ * @pre initialCapacity ≥ 0
*/
public Frame createSubFrame(String tag_name, int initialCapacity) {
return new AFrame(initialCapacity);
@@ -431,7 +431,7 @@ public class AFrame extends VinciFrame {
/**
* @pre in != null
* @pre service_name != null
- * @pre socket_timeout >= 0
+ * @pre socket_timeout ≥ 0
*
* @throws IllegalStateException
* if VNS_HOST is not specified.
@@ -445,7 +445,7 @@ public class AFrame extends VinciFrame {
/**
* @pre in != null
* @pre service_name != null
- * @pre socket_timeout >= 0
+ * @pre socket_timeout ≥ 0
*
* WARNING: This method relies on JDK-1.4 specific functions. USE IT ONLY if you don't need to
* maintain JDK1.3 compatability.
Modified: uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/document/XMLToVinci.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/document/XMLToVinci.java?rev=1555900&r1=1555899&r2=1555900&view=diff
==============================================================================
--- uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/document/XMLToVinci.java (original)
+++ uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/document/XMLToVinci.java Mon Jan 6 16:33:40 2014
@@ -124,8 +124,8 @@ public class XMLToVinci {
/**
* @pre ch != null
- * @pre start < ch.length
- * @pre length >= start
+ * @pre start < ch.length
+ * @pre length ≥ start
* @pre top != null
* @pre top.sub_entries != null
*/
Modified: uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/document/XMLToXTalk.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/document/XMLToXTalk.java?rev=1555900&r1=1555899&r2=1555900&view=diff
==============================================================================
--- uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/document/XMLToXTalk.java (original)
+++ uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/document/XMLToXTalk.java Mon Jan 6 16:33:40 2014
@@ -144,8 +144,8 @@ public class XMLToXTalk {
/**
* @pre ch != null
- * @pre start < ch.length
- * @pre length >= start
+ * @pre start < ch.length
+ * @pre length ≥ start
* @pre top != null
* @pre top.sub_entries != null
*/
Modified: uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/util/Base64Converter.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/util/Base64Converter.java?rev=1555900&r1=1555899&r2=1555900&view=diff
==============================================================================
--- uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/util/Base64Converter.java (original)
+++ uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/util/Base64Converter.java Mon Jan 6 16:33:40 2014
@@ -68,7 +68,7 @@ public class Base64Converter {
}
/**
- * @pre count <= from.length
+ * @pre count ≤ from.length
*/
static public byte[] convertBinaryToBase64(byte[] from, final int count, boolean line_breaks) {
int size = calculateBase64OutputSize(count, line_breaks);
@@ -127,7 +127,7 @@ public class Base64Converter {
/**
* @pre input != null
- * @pre input_size <= input.length
+ * @pre input_size ≤ input.length
*/
static public byte[] convertBase64ToBinary(byte[] input, final int input_size)
throws Base64FormatException {
@@ -146,7 +146,7 @@ public class Base64Converter {
* Calculate the number of bytes encoded by a given Base64 input.
*
* @pre input != null
- * @pre input_size <= input.length
+ * @pre input_size ≤ input.length
*/
static public int calculateBinaryOutputSize(byte[] input, final int input_size)
throws Base64FormatException {
@@ -340,7 +340,7 @@ public class Base64Converter {
* to); byte[] input = new byte[to]; for (int i=0; i<to; i++) { input[i] = (byte)i; } byte[]
* output = convertBinaryToBase64(input); String output_me = new String(output, 0, output.length);
* System.out.println("Encoded string:\n" + output_me); input = convertBase64ToBinary(output); for
- * (int i=0; i<to; i++) { if (input[i] >= 0) { Debug.Assert(i == (int)input[i]); } else {
+ * (int i=0; i<to; i++) { if (input[i] ≥ 0) { Debug.Assert(i == (int)input[i]); } else {
* Debug.Assert(i == ((int)input[i]) + 256); } } if (to != 0 && args.length > 0) { // Test all
* cases all the way down to 0 length arrays args[0] = Integer.toString(to-1); main(args); } }
*/
Modified: uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/util/UTFConverter.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/util/UTFConverter.java?rev=1555900&r1=1555899&r2=1555900&view=diff
==============================================================================
--- uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/util/UTFConverter.java (original)
+++ uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/util/UTFConverter.java Mon Jan 6 16:33:40 2014
@@ -42,8 +42,8 @@ public class UTFConverter {
* @param bytearr
* Array of bytes.
* @return float.
- * @throws UTFDataFormatException
- * @throws NumberFormatException
+ * @throws UTFDataFormatException if the UTF-8 is encoded improperly
+ * @throws NumberFormatException if conversion to a number can't be done
*/
static public float convertUTFToFloat(byte[] bytearr) throws UTFDataFormatException,
NumberFormatException {
@@ -56,8 +56,8 @@ public class UTFConverter {
* @param bytearr
* Array of bytes.
* @return double.
- * @throws UTFDataFormatException
- * @throws NumberFormatException
+ * @throws UTFDataFormatException if the UTF-8 is encoded improperly
+ * @throws NumberFormatException if conversion to a number can't be done
*/
static public double convertUTFToDouble(byte[] bytearr) throws UTFDataFormatException,
NumberFormatException {
@@ -70,7 +70,7 @@ public class UTFConverter {
* @param bytearr
* Array of bytes.
* @return boolean.
- * @throws UTFDataFormatException
+ * @throws UTFDataFormatException if the UTF-8 is encoded improperly
*/
static public boolean convertUTFToBool(byte[] bytearr) throws UTFDataFormatException {
return TRUE_VALUE.equals(UTFConverter.convertUTFToString(bytearr));
@@ -82,8 +82,8 @@ public class UTFConverter {
* @param bytearr
* Array of bytes.
* @return int.
- * @throws UTFDataFormatException
- * @throws NumberFormatException
+ * @throws UTFDataFormatException if the UTF-8 is encoded improperly
+ * @throws NumberFormatException if conversion to a number can't be done
*/
static public int convertUTFToInt(byte[] bytearr) throws UTFDataFormatException,
NumberFormatException {
@@ -96,8 +96,8 @@ public class UTFConverter {
* @param bytearr
* Array of bytes.
* @return long.
- * @throws UTFDataFormatException
- * @throws NumberFormatException
+ * @throws UTFDataFormatException if the UTF-8 is encoded improperly
+ * @throws NumberFormatException if conversion to a number can't be done
*/
static public long convertUTFToLong(byte[] bytearr) throws UTFDataFormatException,
NumberFormatException {
@@ -110,7 +110,7 @@ public class UTFConverter {
* @param bytearr
* Array of bytes.
* @return String.
- * @throws UTFDataFormatException
+ * @throws UTFDataFormatException if the UTF-8 is encoded improperly
*/
static public String convertUTFToString(byte[] bytearr) throws UTFDataFormatException {
char[] result = new char[bytearr.length];
@@ -132,7 +132,7 @@ public class UTFConverter {
* @param result
* Character array containing the converted characters.
* @return The length of the converted characters.
- * @throws UTFDataFormatException
+ * @throws UTFDataFormatException if the UTF-8 is encoded improperly
*/
static public int convertUTFToString(byte[] bytearr, final int beginOffset,
final int inputLength, char[] result) throws UTFDataFormatException {
Modified: uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/vns/client/ServeonResult.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/vns/client/ServeonResult.java?rev=1555900&r1=1555899&r2=1555900&view=diff
==============================================================================
--- uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/vns/client/ServeonResult.java (original)
+++ uima/uimaj/trunk/jVinci/src/main/java/org/apache/vinci/transport/vns/client/ServeonResult.java Mon Jan 6 16:33:40 2014
@@ -46,8 +46,8 @@ public class ServeonResult extends Frame
*
* @pre service_name != null
* @pre host_name != null
- * @pre priority >= -1
- * @pre instance >= 0
+ * @pre priority ≥ -1
+ * @pre instance ≥ 0
*/
static public Transportable composeQuery(String service_name, String host_name, int priority,
int instance) {
@@ -62,7 +62,7 @@ public class ServeonResult extends Frame
*
* @pre service_name != null
* @pre host_name != null
- * @pre priority >= -1
+ * @pre priority ≥ -1
*/
static public Transportable composeQuery(String service_name, String host_name, int priority) {
VinciFrame query = (VinciFrame) composeQuery(service_name, host_name);