commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject cvs commit: jakarta-commons/codec/src/java/org/apache/commons/codec/net URLCodec.java QCodec.java BCodec.java QuotedPrintableCodec.java
Date Fri, 27 Aug 2004 17:10:48 GMT
ggregory    2004/08/27 10:10:48

  Modified:    codec/src/java/org/apache/commons/codec/net URLCodec.java
                        QCodec.java BCodec.java QuotedPrintableCodec.java
  Log:
  Bugzilla Bug 30864
  [codec] Document how to print a QPDecoderStream with QCodec?
  Added Javadoc noting that arguments are expected to be String (and byte[] sometimes).
  Codec does not do Stream (yet).
  
  Revision  Changes    Path
  1.21      +19 -15    jakarta-commons/codec/src/java/org/apache/commons/codec/net/URLCodec.java
  
  Index: URLCodec.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/codec/src/java/org/apache/commons/codec/net/URLCodec.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- URLCodec.java	26 Jul 2004 22:55:39 -0000	1.20
  +++ URLCodec.java	27 Aug 2004 17:10:48 -0000	1.21
  @@ -318,32 +318,36 @@
       }
   
       /**
  -     * Decodes a URL safe object into its original form. Escaped 
  -     * characters are converted back to their original representation.
  -     *
  -     * @param pObject URL safe object to convert into its original form
  -     * @return original object 
  -     * @throws DecoderException Thrown if URL decoding is not 
  -     *                          applicable to objects of this type
  -     *                          if decoding is unsuccessful
  +     * Decodes a URL safe object into its original form. Escaped characters are converted
back to their original
  +     * representation.
  +     * 
  +     * <p>
  +     * <em>Currently, this method only works with <code>String</code>
and <code>byte[]</code> arguments. 
  +     * A <code>DecoderException</code> is thrown if the argument is not a <code>String</code>
or <code>byte[].</code></em>.
  +     * </p>
  +     * 
  +     * @param pObject
  +     *                  URL safe object to convert into its original form
  +     * @return original object
  +     * @throws DecoderException
  +     *                  Thrown if URL decoding is not applicable to objects of this type
if decoding is unsuccessful
        */
       public Object decode(Object pObject) throws DecoderException {
           if (pObject == null) {
               return null;
           } else if (pObject instanceof byte[]) {
  -            return decode((byte[])pObject);
  +            return decode((byte[]) pObject);
           } else if (pObject instanceof String) {
  -            return decode((String)pObject);
  +            return decode((String) pObject);
           } else {
  -            throw new DecoderException("Objects of type " +
  -                pObject.getClass().getName() + " cannot be URL decoded"); 
  -              
  +            throw new DecoderException("Objects of type " + pObject.getClass().getName()
+ " cannot be URL decoded");
  +
           }
       }
   
       /**
        * The <code>String</code> encoding used for decoding and encoding.
  -     *
  +     * 
        * @return Returns the encoding.
        * 
        * @deprecated use #getDefaultCharset()
  
  
  
  1.8       +7 -1      jakarta-commons/codec/src/java/org/apache/commons/codec/net/QCodec.java
  
  Index: QCodec.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/codec/src/java/org/apache/commons/codec/net/QCodec.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- QCodec.java	26 Jul 2004 22:55:40 -0000	1.7
  +++ QCodec.java	27 Aug 2004 17:10:48 -0000	1.8
  @@ -259,6 +259,12 @@
        * Decodes a quoted-printable object into its original form. Escaped characters are
converted back to their original
        * representation.
        * 
  +     * <p>
  +     * <em>Currently, this method only works with <code>String</code>
arguments. 
  +     * A <code>DecoderException</code> is thrown if the argument is not a <code>String</code>.</em>
  +     * </p>
  +     * 
  +     * 
        * @param pObject
        *                  quoted-printable object to convert into its original form
        * 
  
  
  
  1.8       +6 -1      jakarta-commons/codec/src/java/org/apache/commons/codec/net/BCodec.java
  
  Index: BCodec.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/codec/src/java/org/apache/commons/codec/net/BCodec.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- BCodec.java	5 Aug 2004 20:39:39 -0000	1.7
  +++ BCodec.java	27 Aug 2004 17:10:48 -0000	1.8
  @@ -177,6 +177,11 @@
        * Decodes a Base64 object into its original form. Escaped characters are converted
back to their original
        * representation.
        * 
  +     * <p>
  +     * <em>Currently, this method only works with <code>String</code>
arguments. 
  +     * A <code>DecoderException</code> is thrown if the argument is not a <code>String</code>.</em>
  +     * </p>
  +     * 
        * @param value
        *                  Base64 object to convert into its original form
        * 
  
  
  
  1.10      +6 -1      jakarta-commons/codec/src/java/org/apache/commons/codec/net/QuotedPrintableCodec.java
  
  Index: QuotedPrintableCodec.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/codec/src/java/org/apache/commons/codec/net/QuotedPrintableCodec.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- QuotedPrintableCodec.java	5 Aug 2004 20:39:39 -0000	1.9
  +++ QuotedPrintableCodec.java	27 Aug 2004 17:10:48 -0000	1.10
  @@ -332,6 +332,11 @@
        * Decodes a quoted-printable object into its original form. Escaped characters are
converted back to their original
        * representation.
        * 
  +     * <p>
  +     * <em>Currently, this method only works with <code>String</code>
and <code>byte[]</code> arguments. 
  +     * A <code>DecoderException</code> is thrown if the argument is not a <code>String</code>
or <code>byte[].</code></em>.
  +     * </p>
  +     * 
        * @param pObject
        *                  quoted-printable object to convert into its original form
        * @return original object
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message