/**
* Write data
- * @param buf containg the bytes to write.
+ * @param buf containing the bytes to write.
* @return Number of characters written.
*/
public int write(byte [] buf);
/**
* Read string up to the len or CLRLF
* @param len Maximum number of characters to read
- * @return String with up to len bytes readed
+ * @return String with up to len bytes read
*/
public String gets(int len);
/**
* Create a new directory on the file system.
* @param path the path for the directory to be created. (use / on all systems)
- * @param perm Permissions for the new direcoty.
+ * @param perm Permissions for the new directory.
* @param pool the pool to use.
*/
public static native int make(String path, int perm, long pool);
* 'mkdir -p'. Creates intermediate directories as required. No error
* will be reported if PATH already exists.
* @param path the path for the directory to be created. (use / on all systems)
- * @param perm Permissions for the new direcoty.
+ * @param perm Permissions for the new directory.
* @param pool the pool to use.
*/
public static native int makeRecursive(String path, int perm, long pool);
public static native int writeFullb(long thefile, ByteBuffer buf, int offset, int nbytes);
/**
- * Write data from aray of byte arrays to the specified file.
+ * Write data from array of byte arrays to the specified file.
*
* It is possible for both bytes to be written and an error to
* be returned. APR_EINTR is never returned.
public static native int writev(long thefile, byte[][] vec);
/**
- * Write data from aray of byte arrays to the specified file,
+ * Write data from array of byte arrays to the specified file,
* ensuring that all of the data is written before returning.
*
* writevFull is available even if the underlying
/**
* Read a character from the specified file.
* @param thefile The file descriptor to read from
- * @return The readed character
+ * @return The read character
*/
public static native int getc(long thefile)
throws Error;
/**
* Set attributes of the specified file.
- * This function should be used in preference to explict manipulation
+ * This function should be used in preference to explicit manipulation
* of the file permissions, because the operations to provide these
* attributes are platform specific and may involve more than simply
* setting permission bits.
/**
* Retrieve the flags that were passed into apr_file_open()
* when the file was opened.
- * @param file The file to retrive flags.
+ * @param file The file to retrieve flags.
* @return the flags
*/
public static native int flagsGet(long file);
* @param sock The socket to listen on
* @param backlog The number of outstanding connections allowed in the sockets
* listen queue. If this value is less than zero, for NT pipes
- * the number of instances is unlimite.
+ * the number of instances is unlimited.
*
*/
public static native int listen(long sock, int backlog);
public static final boolean IS_MACOSX = is(MACOSX);
/**
- * Get the name of the system default characer set.
+ * Get the name of the system default character set.
* @param pool the pool to allocate the name from, if needed
*/
public static native String defaultEncoding(long pool);
/**
* Get the name of the current locale character set.
* Defers to apr_os_default_encoding if the current locale's
- * data can't be retreved on this system.
+ * data can't be retrieved on this system.
* @param pool the pool to allocate the name from, if needed
*/
public static native String localeEncoding(long pool);
public static final int APR_POLLOUT = 0x004; /** Can write without blocking */
public static final int APR_POLLERR = 0x010; /** Pending error */
public static final int APR_POLLHUP = 0x020; /** Hangup occurred */
- public static final int APR_POLLNVAL = 0x040; /** Descriptior invalid */
+ public static final int APR_POLLNVAL = 0x040; /** Descriptor invalid */
/**
* Pollset Flags
* Add a socket or to a pollset
* If you set client_data in the descriptor, that value
* will be returned in the client_data field whenever this
- * descriptor is signalled in apr_pollset_poll().
+ * descriptor is signaled in apr_pollset_poll().
* @param pollset The pollset to which to add the descriptor
* @param sock The sockets to add
* @param reqevents requested events
* Block for activity on the descriptor(s) in a pollset
* @param pollset The pollset to use
* @param timeout Timeout in microseconds
- * @param descriptors Array of signalled descriptors (output parameter)
- * The desctiptor array must be two times the size of pollset.
+ * @param descriptors Array of signaled descriptors (output parameter)
+ * The descriptor array must be two times the size of pollset.
* and are populated as follows:
* <PRE>
* descriptors[n + 0] -> returned events
* descriptors[n + 1] -> socket
* </PRE>
* @param remove Remove signaled descriptors from pollset
- * @return Number of signalled descriptors (output parameter)
+ * @return Number of signaled descriptors (output parameter)
* or negative APR error code.
*/
public static native int poll(long pollset, long timeout,
/**
* Maintain on the descriptor(s) in a pollset
* @param pollset The pollset to use
- * @param descriptors Array of signalled descriptors (output parameter)
- * The desctiptor array must be the size of pollset.
+ * @param descriptors Array of signaled descriptors (output parameter)
+ * The descriptor array must be the size of pollset.
* and are populated as follows:
* <PRE>
* descriptors[n] -> socket
* </PRE>
* @param remove Remove signaled descriptors from pollset
- * @return Number of signalled descriptors (output parameter)
+ * @return Number of signaled descriptors (output parameter)
* or negative APR error code.
*/
public static native int maintain(long pollset, long [] descriptors,
* Return all descriptor(s) in a pollset
* @param pollset The pollset to use
* @param descriptors Array of descriptors (output parameter)
- * The desctiptor array must be two times the size of pollset.
+ * The descriptor array must be two times the size of pollset.
* and are populated as follows:
* <PRE>
* descriptors[n + 0] -> returned events
* <br /><b>Warning :</b>
* The data to be attached to the pool should have a life span
* at least as long as the pool it is being attached to.
- * Object attached to the pool will be globaly referenced
- * untill the pool is cleared or dataSet is called with the null data.
+ * Object attached to the pool will be globally referenced
+ * until the pool is cleared or dataSet is called with the null data.
* @return APR Status code.
*/
public static native int dataSet(long pool, String key, Object data);
public static final int APR_OC_REASON_DEATH = 0;
/** write_fd is unwritable */
public static final int APR_OC_REASON_UNWRITABLE = 1;
- /** a restart is occuring, perform any necessary cleanup (including
+ /** a restart is occurring, perform any necessary cleanup (including
* sending a special signal to child)
*/
public static final int APR_OC_REASON_RESTART = 2;
public static final int APR_OC_REASON_UNREGISTER = 3;
/** somehow the child exited without us knowing ... buggy os? */
public static final int APR_OC_REASON_LOST = 4;
- /** a health check is occuring, for most maintainence functions
+ /** a health check is occurring, for most maintenance functions
* this is a no-op.
*/
public static final int APR_OC_REASON_RUNNING = 5;
public static final int MAX_ENV_SIZE = 1024;
/**
- * Allocate apr_proc_t stucture from pool
+ * Allocate apr_proc_t structure from pool
* This is not an apr function.
* @param cont The pool to use.
*/
* lifetime of JVM. Library.init() has to be called before.
* @param engine Support for external a Crypto Device ("engine"),
* usually
- * a hardware accellerator card for crypto operations.
+ * a hardware accelerator card for crypto operations.
* @return APR status code
*/
public static native int initialize(String engine);
throws Exception;
/**
- * Close BIO and derefrence callback object
+ * Close BIO and dereference callback object
* @param bio BIO to close and destroy.
* @return APR Status code
*/
* SSL_TMP_KEY_DH_4096
* </PRE>
* @param idx temporary key index.
- * @param file File contatining DH params.
+ * @param file File containing DH params.
*/
public static native boolean loadDSATempKey(int idx, String file);
public static native void setContextId(long ctx, String id);
/**
- * Asssociate BIOCallback for input or output data capture.
+ * Associate BIOCallback for input or output data capture.
* <br />
* First word in the output string will contain error
* level in the form:
* <PRE>
* [ERROR] -- Critical error messages
- * [WARN] -- Varning messages
+ * [WARN] -- Warning messages
* [INFO] -- Informational messages
* [DEBUG] -- Debugging messaged
* </PRE>
* directive can be used both in per-server and per-directory context.
* In per-server context it applies to the standard SSL handshake when a
* connection is established. In per-directory context it forces a SSL
- * renegotation with the reconfigured Cipher Suite after the HTTP request
+ * renegotiation with the reconfigured Cipher Suite after the HTTP request
* was read but before the HTTP response is sent.
* @param ctx Server or Client context to use.
* @param ciphers An SSL cipher specification.
* @param cert Certificate file.
* @param key Private Key file to use if not in cert.
* @param password Certificate password. If null and certificate
- * is encrypted, password prompt will be dispayed.
+ * is encrypted, password prompt will be displayed.
* @param idx Certificate index SSL_AIDX_RSA or SSL_AIDX_DSA.
*/
public static native boolean setCertificate(long ctx, String cert,
* Authentication. Notice that this directive can be used both in per-server
* and per-directory context. In per-server context it applies to the client
* authentication process used in the standard SSL handshake when a connection
- * is established. In per-directory context it forces a SSL renegotation with
+ * is established. In per-directory context it forces a SSL renegotiation with
* the reconfigured client verification level after the HTTP request was read
* but before the HTTP response is sent.
* <br />
public class Shm {
/**
- * Create and make accessable a shared memory segment.
+ * Create and make accessible a shared memory segment.
* <br />
* A note about Anonymous vs. Named shared memory segments:<br />
- * Not all plaforms support anonymous shared memory segments, but in
- * some cases it is prefered over other types of shared memory
+ * Not all platforms support anonymous shared memory segments, but in
+ * some cases it is preferred over other types of shared memory
* implementations. Passing a NULL 'file' parameter to this function
* will cause the subsystem to use anonymous shared memory segments.
* If such a system is not available, APR_ENOTIMPL is returned.
* @param t Value for the timeout in microseconds.
* <PRE>
* t > 0 -- read and write calls return APR_TIMEUP if specified time
- * elapsess with no data read or written
+ * elapses with no data read or written
* t == 0 -- read and write calls never block
* t < 0 -- read and write calls block
* </PRE>
throws Exception;
/**
- * Private method for geting the socket struct members
- * @param socket The soocket to use
+ * Private method for getting the socket struct members
+ * @param socket The socket to use
* @param what Struct member to obtain
* <PRE>
* SOCKET_GET_POOL - The socket pool
* SOCKET_GET_APRS - APR socket
* SOCKET_GET_TYPE - Socket type
* </PRE>
- * @return The stucture member address
+ * @return The structure member address
*/
private static native long get(long socket, int what);
/** number of microseconds per second */
public static final long APR_USEC_PER_SEC = 1000000L;
- /** number of miliseconds per microsecond */
+ /** number of milliseconds per microsecond */
public static final long APR_MSEC_PER_USEC = 1000L;
/** @return apr_time_t as a second */
}
/**
- * number of microseconds since 00:00:00 january 1, 1970 UTC
+ * number of microseconds since 00:00:00 January 1, 1970 UTC
* @return the current time
*/
public static native long now();
* This function is available only if APR_HAS_USER is defined.
* @param left One uid to test
* @param right Another uid to test
- * @return APR_SUCCESS if the apr_uid_t strutures identify the same user,
+ * @return APR_SUCCESS if the apr_uid_t structures identify the same user,
* APR_EMISMATCH if not, APR_BADARG if an apr_uid_t is invalid.
*/
public static native int uidcompare(long left, long right);
* This function is available only if APR_HAS_USER is defined.
* @param left One gid to test
* @param right Another gid to test
- * @return APR_SUCCESS if the apr_gid_t strutures identify the same group,
+ * @return APR_SUCCESS if the apr_gid_t structures identify the same group,
* APR_EMISMATCH if not, APR_BADARG if an apr_gid_t is invalid.
*/
public static native int gidcompare(long left, long right);
// -------------------- DOM utils --------------------
- /** Get the trimed text content of a node or null if there is no text
+ /** Get the trimmed text content of a node or null if there is no text
*/
public static String getContent(Node n ) {
if( n==null ) return null;
}
/** Get the first element child.
- * @param parent lookup direct childs
+ * @param parent lookup direct children
* @param name name of the element. If null return the first element.
*/
public static Node getChild( Node parent, String name ) {
Method myMethods[] = findMethods(obj.getClass());
for (int i = 0; i < myMethods.length; i++) {
if (methodN.equals(myMethods[i].getName())) {
- // check if it's overriden
+ // check if it's overridden
Class<?> declaring = myMethods[i].getDeclaringClass();
Class<?> parentOfDeclaring = declaring.getSuperclass();
// this works only if the base class doesn't extend
/** Efficient conversion of bytes to character .
*
- * This uses the standard JDK mechansim - a reader - but provides mechanisms
+ * This uses the standard JDK mechanism - a reader - but provides mechanisms
* to recycle all the objects that are used. It is compatible with JDK1.1
* and up,
* ( nio is better, but it's not available even in 1.2 or 1.3 )
super( in, enc );
}
- /** Overriden - will do nothing but reset internal state.
+ /** Overridden - will do nothing but reset internal state.
*/
@Override
public final void close() throws IOException {
}
-/** Special output stream where close() is overriden, so super.close()
+/** Special output stream where close() is overridden, so super.close()
is never called.
This allows recycling. It can also be disabled, so callbacks will
*/
public final class ByteChunk implements Cloneable, Serializable {
- /** Input interface, used when the buffer is emptiy
+ /** Input interface, used when the buffer is empty
*
* Same as java.nio.channel.ReadableByteChannel
*/
/** Maximum amount of data in this buffer.
*
- * If -1 or not set, the buffer will grow undefinitely.
+ * If -1 or not set, the buffer will grow indefinitely.
* Can be smaller than the current buffer size ( which will not shrink ).
* When the limit is reached, the buffer will be flushed ( if out is set )
* or throw exception.
/** Send the buffer to the sink. Called by append() when the limit is reached.
- * You can also call it explicitely to force the data to be written.
+ * You can also call it explicitly to force the data to be written.
*
* @throws IOException
*/
strValue = new String( buff, start, end-start, enc );
/*
Does not improve the speed too much on most systems,
- it's safer to use the "clasical" new String().
+ it's safer to use the "classical" new String().
Most overhead is in creating char[] and copying,
the internal implementation of new String() is very close to
/** Efficient conversion of character to bytes.
*
- * This uses the standard JDK mechansim - a writer - but provides mechanisms
+ * This uses the standard JDK mechanism - a writer - but provides mechanisms
* to recycle all the objects that are used. It is compatible with JDK1.1 and up,
* ( nio is better, but it's not available even in 1.2 or 1.3 )
*
/**
- * Special writer class, where close() is overritten. The default implementation
- * would set byteOutputter to null, and the writter can't be recycled.
+ * Special writer class, where close() is overridden. The default implementation
+ * would set byteOutputter to null, and the writer can't be recycled.
*
* Note that the flush method will empty the internal buffers _and_ call
* flush on the output stream - that's why we use an intermediary output stream
*
*/
final class WriteConvertor extends OutputStreamWriter {
- // stream with flush() and close(). overriden.
+ // stream with flush() and close(). overridden.
private IntermediateOutputStream ios;
// Has a private, internal byte[8192]
ios=out;
}
- /** Overriden - will do nothing but reset internal state.
+ /** Overridden - will do nothing but reset internal state.
*/
@Override
public final void close() throws IOException {
}
-/** Special output stream where close() is overriden, so super.close()
+/** Special output stream where close() is overridden, so super.close()
is never called.
This allows recycling. It can also be disabled, so callbacks will
import java.io.Serializable;
/**
- * Utilities to manipluate char chunks. While String is
+ * Utilities to manipulate char chunks. While String is
* the easiest way to manipulate chars ( search, substrings, etc),
* it is known to not be the most efficient solution - Strings are
- * designed as imutable and secure objects.
+ * designed as immutable and secure objects.
*
* @author dac@sun.com
* @author James Todd [gonzo@sun.com]
private boolean isSet=false; // XXX
- // -1: grow undefinitely
+ // -1: grow indefinitely
// maximum amount to be cached
private int limit=-1;
/** Maximum amount of data in this buffer.
*
- * If -1 or not set, the buffer will grow undefinitely.
+ * If -1 or not set, the buffer will grow indefinitely.
* Can be smaller than the current buffer size ( which will not shrink ).
* When the limit is reached, the buffer will be flushed ( if out is set )
* or throw exception.
*/
public void setEncoding( String enc ) {
if( !byteC.isNull() ) {
- // if the encoding changes we need to reset the converion results
+ // if the encoding changes we need to reset the conversion results
charC.recycle();
hasStrValue=false;
}
*/
public void resetStringValue() {
if( type != T_STR ) {
- // If this was cread as a byte[] or char[], we remove
+ // If this was created as a byte[] or char[], we remove
// the old string value
hasStrValue=false;
strValue=null;
// mb is either CHARS or BYTES.
// this is either CHARS or BYTES
- // Deal with the 4 cases ( in fact 3, one is simetric)
+ // Deal with the 4 cases ( in fact 3, one is symmetric)
if( mb.type == T_CHARS && type==T_CHARS ) {
return charC.equals( mb.charC );
// If training, everything is synced
synchronized (bcStats) {
// If the cache has been generated on a previous invocation
- // while waiting fot the lock, just return the toString value
+ // while waiting for the lock, just return the toString value
// we just calculated
if (bcCache != null) {
return value;
return;
}
- // idx will be the smallest positive inxes ( first % or + )
+ // idx will be the smallest positive indexes ( first % or + )
if( idx2 >= 0 && idx2 < idx ) idx=idx2;
if( idx < 0 ) idx=idx2;
}
/**
- * Utility funtion to re-encode the URL.
+ * Utility function to re-encode the URL.
* Still has problems with charset, since UEncoder mostly
* ignores it.
*/
count--;
}
- /** Create a new, unitialized entry.
+ /** Create a new, uninitialized entry.
*/
public int addField() {
int len = fields.length;
import java.util.Enumeration;
/** Enumerate the distinct header names.
- Each nextElement() is O(n) ( a comparation is
+ Each nextElement() is O(n) ( a comparison is
done with all previous elements ).
- This is less frequesnt than add() -
+ This is less frequent than add() -
we want to keep add O(1).
*/
public final class MultiMapNamesEnumeration implements Enumeration<String> {
MultiMap headers;
// toString and unique options are not implemented -
- // we allways to toString and unique.
+ // we always to toString and unique.
/** Create a new multi-map enumeration.
* @param headers the collection to enumerate
/** Digester using this <code>Rules</code> implementation */
private Digester digester;
- /** Namespace uri to assoicate with subsequent <code>Rule</code>'s */
+ /** Namespace uri to associate with subsequent <code>Rule</code>'s */
private String namespaceURI;
// ------------------------------------------------------------- Properties
*
* @param methodName Method name of the parent method to call
* @param paramCount The number of parameters to collect, or
- * zero for a single argument from the body of ths element
+ * zero for a single argument from the body of this element
* @param paramTypes The Java class names of the arguments
- * (if you wish to use a primitive type, specify the corresonding
+ * (if you wish to use a primitive type, specify the corresponding
* Java wrapper class instead, such as <code>java.lang.Boolean</code>
* for a <code>boolean</code> parameter)
*/
* object on the stack.
* @param methodName Method name of the parent method to call
* @param paramCount The number of parameters to collect, or
- * zero for a single argument from the body of ths element
+ * zero for a single argument from the body of this element
* @param paramTypes The Java class names of the arguments
- * (if you wish to use a primitive type, specify the corresonding
+ * (if you wish to use a primitive type, specify the corresponding
* Java wrapper class instead, such as <code>java.lang.Boolean</code>
* for a <code>boolean</code> parameter)
*/
*
* @param methodName Method name of the parent method to call
* @param paramCount The number of parameters to collect, or
- * zero for a single argument from the body of ths element
+ * zero for a single argument from the body of this element
* @param paramTypes The Java classes that represent the
* parameter types of the method arguments
- * (if you wish to use a primitive type, specify the corresonding
+ * (if you wish to use a primitive type, specify the corresponding
* Java wrapper class instead, such as <code>java.lang.Boolean.TYPE</code>
* for a <code>boolean</code> parameter)
*/
* object on the stack.
* @param methodName Method name of the parent method to call
* @param paramCount The number of parameters to collect, or
- * zero for a single argument from the body of ths element
+ * zero for a single argument from the body of this element
* @param paramTypes The Java classes that represent the
* parameter types of the method arguments
- * (if you wish to use a primitive type, specify the corresonding
+ * (if you wish to use a primitive type, specify the corresponding
* Java wrapper class instead, such as <code>java.lang.Boolean.TYPE</code>
* for a <code>boolean</code> parameter)
*/
* allows Digester to be used in environments which are unfriendly to
* JAXP1.1 (such as WebLogic 6.0). Note that if you use this option you
* have to configure namespace and validation support yourself, as these
- * properties only affect the SAXParser and emtpy constructor.
+ * properties only affect the SAXParser and empty constructor.
*/
public Digester(XMLReader reader) {
/**
- * Set the publid id of the current file being parse.
+ * Set the public id of the current file being parse.
* @param publicId the DTD/Schema public's id.
*/
public void setPublicId(String publicId){
* for a single parameter from the body of this element)
* @param paramTypes Set of Java class names for the types
* of the expected parameters
- * (if you wish to use a primitive type, specify the corresonding
+ * (if you wish to use a primitive type, specify the corresponding
* Java wrapper class instead, such as <code>java.lang.Boolean</code>
* for a <code>boolean</code> parameter)
* @see CallMethodRule
* @param paramCount Number of expected parameters (or zero
* for a single parameter from the body of this element)
* @param paramTypes The Java class names of the arguments
- * (if you wish to use a primitive type, specify the corresonding
+ * (if you wish to use a primitive type, specify the corresponding
* Java wrapper class instead, such as <code>java.lang.Boolean</code>
* for a <code>boolean</code> parameter)
* @see CallMethodRule
* @param pattern Element matching pattern
* @param methodName Method name to call on the parent element
* @param paramType Java class name of the expected parameter type
- * (if you wish to use a primitive type, specify the corresonding
+ * (if you wish to use a primitive type, specify the corresponding
* Java wrapper class instead, such as <code>java.lang.Boolean</code>
* for a <code>boolean</code> parameter)
* @see SetNextRule
* @param pattern Element matching pattern
* @param methodName Method name to call on the parent element
* @param paramType Java class name of the expected parameter type
- * (if you wish to use a primitive type, specify the corresonding
+ * (if you wish to use a primitive type, specify the corresponding
* Java wrapper class instead, such as <code>java.lang.Boolean</code>
* for a <code>boolean</code> parameter)
* @see SetTopRule
* complete, the object will be popped.</p>
*
* <p>This rule is intended in situations where the element's attributes are
- * needed before the object can be created. A common senario is for the
+ * needed before the object can be created. A common scenario is for the
* ObjectCreationFactory implementation to use the attributes as parameters
* in a call to either a factory method or to a non-empty constructor.
*/
"http://java.sun.com/xml/jaxp/properties/schemaLanguage";
/**
- * Create a <code>SAXParser</code> configured to support XML Scheman and DTD
+ * Create a <code>SAXParser</code> configured to support XML Schema and DTD
* @param properties parser specific properties/features
* @return an XML Schema/DTD enabled <code>SAXParser</code>
*/
* containing all XML content underneath that element.</li>
* <li>alternatively, this rule can create nodes of type
* {@link org.w3c.dom.DocumentFragment DocumentFragment}, which will contain
- * only the XML content under the element the rule was trigged on.</li>
+ * only the XML content under the element the rule was triggered on.</li>
* </ul>
* The created node will be normalized, meaning it will not contain text nodes
* that only contain white space characters.
* <p>Public interface defining a shorthand means of configuring a complete
* set of related <code>Rule</code> definitions, possibly associated with
* a particular namespace URI, in one operation. To use an instance of a
- * class that imlements this interface:</p>
+ * class that implements this interface:</p>
* <ul>
* <li>Create a concrete implementation of this interface.</li>
* <li>Optionally, you can configure a <code>RuleSet</code> to be relevant
/**
* The set of registered Rule instances, keyed by the matching pattern.
* Each value is a List containing the Rules for that pattern, in the
- * order that they were orginally registered.
+ * order that they were originally registered.
*/
protected HashMap<String,List<Rule>> cache =
new HashMap<String,List<Rule>>();
* @param digester The associated Digester
* @param methodName Method name of the parent method to call
* @param paramType Java class of the parent method's argument
- * (if you wish to use a primitive type, specify the corresonding
+ * (if you wish to use a primitive type, specify the corresponding
* Java wrapper class instead, such as <code>java.lang.Boolean</code>
* for a <code>boolean</code> parameter)
*
*
* @param methodName Method name of the parent method to call
* @param paramType Java class of the parent method's argument
- * (if you wish to use a primitive type, specify the corresonding
+ * (if you wish to use a primitive type, specify the corresponding
* Java wrapper class instead, such as <code>java.lang.Boolean</code>
* for a <code>boolean</code> parameter)
*/
* <p>Is exact matching being used.</p>
*
* <p>This rule uses <code>org.apache.commons.beanutils.MethodUtils</code>
- * to introspect the relevent objects so that the right method can be called.
+ * to introspect the relevant objects so that the right method can be called.
* Originally, <code>MethodUtils.invokeExactMethod</code> was used.
* This matches methods very strictly
* and so may not find a matching method when one exists.
}
/**
- * <p>Constructor allows attribute->property mapping to be overriden.</p>
+ * <p>Constructor allows attribute->property mapping to be overridden.</p>
*
* <p>Two arrays are passed in.
* One contains the attribute names and the other the property names.
* to the first string in the property name list and so on.</p>
*
* <p>If a property name is null or the attribute name has no matching
- * property name, then this indicates that the attibute should be ignored.</p>
+ * property name, then this indicates that the attribute should be ignored.</p>
*
* <h5>Example One</h5>
* <p> The following constructs a rule that maps the <code>alt-city</code>
* @param attributes The attribute list for this element
*
* @exception NoSuchMethodException if the bean does not
- * have a writeable property of the specified name
+ * have a writable property of the specified name
*/
@Override
public void begin(String namespace, String theName, Attributes attributes)
* @param digester The associated Digester
* @param methodName Method name of the parent method to call
* @param paramType Java class of the parent method's argument
- * (if you wish to use a primitive type, specify the corresonding
+ * (if you wish to use a primitive type, specify the corresponding
* Java wrapper class instead, such as <code>java.lang.Boolean</code>
* for a <code>boolean</code> parameter)
*
*
* @param methodName Method name of the parent method to call
* @param paramType Java class of the parent method's argument
- * (if you wish to use a primitive type, specify the corresonding
+ * (if you wish to use a primitive type, specify the corresponding
* Java wrapper class instead, such as <code>java.lang.Boolean</code>
* for a <code>boolean</code> parameter)
*/
* <p>Is exact matching being used.</p>
*
* <p>This rule uses <code>org.apache.commons.beanutils.MethodUtils</code>
- * to introspect the relevent objects so that the right method can be called.
+ * to introspect the relevant objects so that the right method can be called.
* Originally, <code>MethodUtils.invokeExactMethod</code> was used.
* This matches methods very strictly
* and so may not find a matching method when one exists.
* @param digester The associated Digester
* @param methodName Method name of the "set parent" method to call
* @param paramType Java class of the "set parent" method's argument
- * (if you wish to use a primitive type, specify the corresonding
+ * (if you wish to use a primitive type, specify the corresponding
* Java wrapper class instead, such as <code>java.lang.Boolean</code>
* for a <code>boolean</code> parameter)
*
*
* @param methodName Method name of the "set parent" method to call
* @param paramType Java class of the "set parent" method's argument
- * (if you wish to use a primitive type, specify the corresonding
+ * (if you wish to use a primitive type, specify the corresponding
* Java wrapper class instead, such as <code>java.lang.Boolean</code>
* for a <code>boolean</code> parameter)
*/
* <p>Is exact matching being used.</p>
*
* <p>This rule uses <code>org.apache.commons.beanutils.MethodUtils</code>
- * to introspect the relevent objects so that the right method can be called.
+ * to introspect the relevant objects so that the right method can be called.
* Originally, <code>MethodUtils.invokeExactMethod</code> was used.
* This matches methods very strictly
* and so may not find a matching method when one exists.
return wrappedRules.getDigester();
}
- /** Sets digeseter using these Rules */
+ /** Sets digester using these Rules */
public void setDigester(Digester digester) {
wrappedRules.setDigester(digester);
Iterator<Rule> it = defaultRules.iterator();
/**
- * Usefull methods for Content-Type processing
+ * Useful methods for Content-Type processing
*
* @author James Duncan Davidson [duncan@eng.sun.com]
* @author James Todd [gonzo@eng.sun.com]
// -------------------- Adding cookies --------------------
- /** Register a new, unitialized cookie. Cookies are recycled, and
+ /** Register a new, initialized cookie. Cookies are recycled, and
* most of the time an existing ServerCookie object is returned.
* The caller can set the name/value and attributes for the cookie
*/
isQuoted = true;
valueStart=pos + 1; // strip "
// getQuotedValue returns the position before
- // at the last qoute. This must be dealt with
+ // at the last quote. This must be dealt with
// when the bytes are copied into the cookie
valueEnd=getQuotedValueEndPosition(bytes,
valueStart, end);
bytes[pos] == '=' && CookieSupport.ALLOW_EQUALS_IN_VALUE) {
// Token
valueStart=pos;
- // getToken returns the position at the delimeter
+ // getToken returns the position at the delimiter
// or other non-token character
valueEnd=getTokenEndPosition(bytes, valueStart, end,
version, false);
}
/**
- * Given a starting position after an initial quote chracter, this gets
+ * Given a starting position after an initial quote character, this gets
* the position of the end quote. This escapes anything after a '\' char
* JVK RFC 2616
*/
* Memory-efficient repository for Mime Headers. When the object is recycled, it
* will keep the allocated headers[] and all the MimeHeaderField - no GC is generated.
*
- * For input headers it is possible to use the MessageByte for Fileds - so no GC
+ * For input headers it is possible to use the MessageByte for Fields - so no GC
* will be generated.
*
* The only garbage is generated when using the String for header names/values -
}
/** Enumerate the distinct header names.
- Each nextElement() is O(n) ( a comparation is
+ Each nextElement() is O(n) ( a comparison is
done with all previous elements ).
- This is less frequesnt than add() -
+ This is less frequent than add() -
we want to keep add O(1).
*/
class NamesEnumerator implements Enumeration<String> {
* be used for storing the contents of the file.
*
* @return An {@link java.io.OutputStream OutputStream} that can be used
- * for storing the contensts of the file.
+ * for storing the contents of the file.
*
* @throws IOException if an error occurs.
*/
* multipart-body := preamble 1*encapsulation close-delimiter epilogue<br>
* encapsulation := delimiter body CRLF<br>
* delimiter := "--" boundary CRLF<br>
- * close-delimiter := "--" boudary "--"<br>
+ * close-delimiter := "--" boundary "--"<br>
* preamble := <ignore><br>
* epilogue := <ignore><br>
* body := header-part CRLF body-part<br>
/**
- * The index of last valid characer in the buffer + 1.
+ * The index of last valid character in the buffer + 1.
* <br>
* 0 <= tail <= bufSize
*/
this.buffer = new byte[bufSize];
this.notifier = pNotifier;
- // We prepend CR/LF to the boundary to chop trailng CR/LF from
+ // We prepend CR/LF to the boundary to chop trailing CR/LF from
// body-data tokens.
this.boundary = new byte[boundary.length + BOUNDARY_PREFIX.length];
this.boundaryLength = boundary.length + BOUNDARY_PREFIX.length;
// Discard all data up to the delimiter.
discardBodyData();
- // Read boundary - if succeded, the stream contains an
+ // Read boundary - if succeeded, the stream contains an
// encapsulation.
return readBoundary();
} catch (MalformedStreamException e) {
/**
- * Find a map elemnt given its name in a sorted array of map elements.
+ * Find a map element given its name in a sorted array of map elements.
* This will return the index for the closest inferior or equal item in the
* given array.
*/
/**
- * Find a map elemnt given its name in a sorted array of map elements.
+ * Find a map element given its name in a sorted array of map elements.
* This will return the index for the closest inferior or equal item in the
* given array.
*/
}
/**
- * Find a map elemnt given its name in a sorted array of map elements.
+ * Find a map element given its name in a sorted array of map elements.
* This will return the index for the closest inferior or equal item in the
* given array.
*/
/**
- * Find a map elemnt given its name in a sorted array of map elements.
+ * Find a map element given its name in a sorted array of map elements.
* This will return the index for the closest inferior or equal item in the
* given array.
*/
}
/**
- * Is this attribute writeable by management applications?
+ * Is this attribute writable by management applications?
*/
public boolean isWriteable() {
return (this.writeable);
* - remove methods not used in tomcat and redundant/not very generic
* - must be created from the ManagedBean - I don't think there were any direct
* uses, but now it is required.
- * - some of the gratuituous flexibility removed - instead this is more predictive and
+ * - some of the gratuitous flexibility removed - instead this is more predictive and
* strict with the use cases.
* - all Method and metadata is stored in ManagedBean. BaseModelBMean and ManagedBean act
* like Object and Class.
* Limitations:
* <ul>
* <li>Only managed resources of type <code>objectReference</code> are
- * supportd.</li>
+ * supported.</li>
* <li>Caching of attribute values and operation results is not supported.
* All calls to <code>invoke()</code> are immediately executed.</li>
* <li>Persistence of MBean attributes and operations is not supported.</li>
}
//attributes.put( name, value );
// if( source != null ) {
-// // this mbean is asscoiated with a source - maybe we want to persist
+// // this mbean is associated with a source - maybe we want to persist
// source.updateField(oname, name, value);
// }
}
private HashMap<String,ManagedBean> descriptors =
new HashMap<String,ManagedBean>();
- /** List of managed byeans, keyed by class name
+ /** List of managed beans, keyed by class name
*/
private HashMap<String,ManagedBean> descriptorsByClass =
new HashMap<String,ManagedBean>();
* descriptors file. In the case of File and URL, if the extension is ".ser"
* a serialized version will be loaded.
*
- * This method should be used to explicitely load metadata - but this is not
+ * This method should be used to explicitly load metadata - but this is not
* required in most cases. The registerComponent() method will find metadata
- * in the same pacakge.
+ * in the same package.
*
* @param source
*/
* @param realClass The class to process
* @param methods The methods to process
* @param attMap The attribute map (complete)
- * @param getAttMap The readable attributess map
+ * @param getAttMap The readable attributes map
* @param setAttMap The settable attributes map
* @param invokeAttMap The invokable attributes map
*/
/**
- * Use endfile for sending static files.
+ * Use sendfile for sending static files.
*/
protected boolean useSendfile = Library.APR_HAS_SENDFILE;
public void setUseSendfile(boolean useSendfile) { this.useSendfile = useSendfile; }
*/
protected void destroy() {
// Wait for polltime before doing anything, so that the poller threads
- // exit, otherwise parallel descturction of sockets which are still
+ // exit, otherwise parallel destruction of sockets which are still
// in the poller can cause problems
try {
synchronized (this) {
/**
* Create the sendfile poller. With some versions of APR, the maximum poller size will
- * be 62 (reocmpiling APR is necessary to remove this limitation).
+ * be 62 (recompiling APR is necessary to remove this limitation).
*/
protected void init() {
pool = Pool.create(serverSockPool);
*/
protected void destroy() {
// Wait for polltime before doing anything, so that the poller threads
- // exit, otherwise parallel descturction of sockets which are still
+ // exit, otherwise parallel destruction of sockets which are still
// in the poller can cause problems
try {
synchronized (this) {
* will be handled asynchronously inside the kernel. As a result,
* the poller will never be used.
*
- * @param data containing the reference to the data which should be snet
+ * @param data containing the reference to the data which should be sent
* @return true if all the data has been sent right away, and false
* otherwise
*/
// Close socket and clear pool
remove(state);
// Destroy file descriptor pool, which should close the file
- // Close the socket, as the reponse would be incomplete
+ // Close the socket, as the response would be incomplete
Socket.destroy(state.socket);
continue;
}
if (nw < 0) {
// Close socket and clear pool
remove(state);
- // Close the socket, as the reponse would be incomplete
+ // Close the socket, as the response would be incomplete
// This will close the file too.
Socket.destroy(state.socket);
continue;
/**
* Default server socket factory. Doesn't do much except give us
- * plain ol' server sockets.
+ * plain old server sockets.
*
* @author db@eng.sun.com
* @author Harish Prabandham
//check if thread is available
if ( isWorkerAvailable() ) {
//set interest ops to 0 so we don't get multiple
- //invokations for both read and write on separate threads
+ //Invocations for both read and write on separate threads
reg(sk, attachment, 0);
//read goes before write
if (sk.isReadable()) {
cancelledKey(key, SocketStatus.ERROR,true);//TODO this is not yet being used
} else if (ka.getComet() && ka.getCometNotify() ) {
ka.setCometNotify(false);
- reg(key,ka,0);//avoid multiple calls, this gets reregistered after invokation
+ reg(key,ka,0);//avoid multiple calls, this gets reregistered after invocation
//if (!processSocket(ka.getChannel(), SocketStatus.OPEN_CALLBACK)) processSocket(ka.getChannel(), SocketStatus.DISCONNECT);
if (!processSocket(ka.getChannel(), SocketStatus.OPEN, true)) processSocket(ka.getChannel(), SocketStatus.DISCONNECT, true);
}else if ((ka.interestOps()&SelectionKey.OP_READ) == SelectionKey.OP_READ ||
/** General mechanism to pass attributes from the
* ServerConnector to the socket factory.
*
- * Note that the "prefered" mechanism is to
+ * Note that the "preferred" mechanism is to
* use bean setters and explicit methods, but
* this allows easy configuration via server.xml
* or simple Properties
}
/**
- * Gets the intialized trust managers.
+ * Gets the initialized trust managers.
*/
protected TrustManager[] getTrustManagers(String keystoreType,
String keystoreProvider, String algorithm)