protected Cookie decodeCookie ( String cookieString ) { byte [ ] bytes = hexStringToByteArray ( cookieString ) ; ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream ( bytes ) ; Cookie cookie = null ; try { ObjectInputStream objectInputStream = new ObjectInputStream ( byteArrayInputStream ) ; cookie = ( ( SerializableHttpCookie ) objectInputStream . readObject ( ) ) . getCookie ( ) ; } catch ( IOException e ) { Util . log ( "IOException in decodeCookie" , e ) ; } catch ( ClassNotFoundException e ) { Util . log ( "ClassNotFoundException in decodeCookie" , e ) ; } return cookie ; }
Returns cookie decoded from cookie string