Author: anil.saldhana(a)jboss.com
Date: 2009-05-22 18:34:41 -0400 (Fri, 22 May 2009)
New Revision: 509
Modified:
identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/util/RedirectBindingUtil.java
Log:
JBID-111: project specific exceptions
Modified:
identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/util/RedirectBindingUtil.java
===================================================================
---
identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/util/RedirectBindingUtil.java 2009-05-22
22:32:44 UTC (rev 508)
+++
identity-federation/trunk/jboss-identity-bindings/src/main/java/org/jboss/identity/federation/bindings/util/RedirectBindingUtil.java 2009-05-22
22:34:41 UTC (rev 509)
@@ -21,6 +21,7 @@
*/
package org.jboss.identity.federation.bindings.util;
+import java.io.IOException;
import java.io.InputStream;
import java.net.URLDecoder;
import java.net.URLEncoder;
@@ -41,7 +42,7 @@
* @return
* @throws Exception
*/
- public static String urlEncode(String str) throws Exception
+ public static String urlEncode(String str) throws IOException
{
return URLEncoder.encode(str, "UTF-8");
}
@@ -52,7 +53,7 @@
* @return
* @throws Exception
*/
- public static String urlDecode(String str) throws Exception
+ public static String urlDecode(String str) throws IOException
{
return URLDecoder.decode(str, "UTF-8");
}
@@ -61,9 +62,10 @@
* On the byte array, apply base64 encoding following by URL encoding
* @param stringToEncode
* @return
+ * @throws IOException
* @throws Exception
*/
- public static String base64URLEncode(byte[] stringToEncode) throws Exception
+ public static String base64URLEncode(byte[] stringToEncode) throws IOException
{
String base64Request = Base64.encodeBytes(stringToEncode, Base64.DONT_BREAK_LINES);
return urlEncode(base64Request);
@@ -73,9 +75,10 @@
* On the byte array, apply URL decoding followed by base64 decoding
* @param encodedString
* @return
+ * @throws IOException
* @throws Exception
*/
- public static byte[] urlBase64Decode(String encodedString) throws Exception
+ public static byte[] urlBase64Decode(String encodedString) throws IOException
{
String decodedString = urlDecode(encodedString);
return Base64.decode(decodedString);
@@ -85,9 +88,11 @@
* Apply deflate compression followed by base64 encoding and URL encoding
* @param stringToEncode
* @return
+ * @throws IOException
+ * @throws IOException
* @throws Exception
*/
- public static String deflateBase64URLEncode(String stringToEncode) throws Exception
+ public static String deflateBase64URLEncode(String stringToEncode) throws IOException
{
return deflateBase64URLEncode(stringToEncode.getBytes("UTF-8"));
}
@@ -98,7 +103,7 @@
* @return
* @throws Exception
*/
- public static String deflateBase64URLEncode(byte[] stringToEncode) throws Exception
+ public static String deflateBase64URLEncode(byte[] stringToEncode) throws IOException
{
byte[] deflatedMsg = DeflateUtil.encode(stringToEncode);
return base64URLEncode(deflatedMsg);
@@ -108,9 +113,10 @@
* Apply URL decoding, followed by base64 decoding followed by deflate decompression
* @param encodedString
* @return
+ * @throws IOException
* @throws Exception
*/
- public static InputStream urlBase64DeflateDecode(String encodedString) throws
Exception
+ public static InputStream urlBase64DeflateDecode(String encodedString) throws
IOException
{
byte[] deflatedString = urlBase64Decode(encodedString);
return DeflateUtil.decode(deflatedString);
@@ -122,7 +128,7 @@
* @return
* @throws Exception
*/
- public static InputStream base64DeflateDecode(String encodedString) throws Exception
+ public static InputStream base64DeflateDecode(String encodedString)
{
byte[] base64decodedMsg = Base64.decode(encodedString);
return DeflateUtil.decode(base64decodedMsg);
Show replies by date