Package com.sun.faces.io

Examples of com.sun.faces.io.Base64InputStream


            ObjectInputStream ois = null;

            try {
                InputStream bis;
                if (compressState) {
                    bis = new GZIPInputStream(new Base64InputStream(viewString));
                } else {
                    bis = new Base64InputStream(viewString);
                }
                if (guard != null) {
                    ois = serialProvider.createObjectInputStream(new CipherInputStream(bis, guard.getDecryptionCipher()));
                } else {
                    ois = serialProvider.createObjectInputStream(bis);
View Full Code Here


        if ("stateless".equals(stateString)) {
            return null;
        }
       
        ObjectInputStream ois = null;
        InputStream bis = new Base64InputStream(stateString);
        try {
            if (guard != null) {
                byte[] bytes = stateString.getBytes();
                int numRead = bis.read(bytes, 0, bytes.length);
                byte[] decodedBytes = new byte[numRead];
                bis.reset();
                bis.read(decodedBytes, 0, decodedBytes.length);

                bytes = guard.decrypt(decodedBytes);
                if (bytes == null) return null;
                bis = new ByteArrayInputStream(bytes);
            }
View Full Code Here

            try {                          
                InputStream bis;
                if (guard != null) {
                    bis = new CipherInputStream(
                          new Base64InputStream(viewString),
                          guard.getDecryptionCipher());                   
                } else {
                    bis = new Base64InputStream(viewString);
                }
                   
                if (compressState) {                                       
                    ois = serialProvider.createObjectInputStream(
                          new GZIPInputStream(bis));
View Full Code Here

    private ObjectInputStream initInputStream(String stateString)
    throws IOException {

        InputStream bis;
        if (compressViewState) {
            bis = new GZIPInputStream(new Base64InputStream(stateString));
        } else {
            bis = new Base64InputStream(stateString);
        }

        ObjectInputStream ois;
        if (guard != null) {
            ois = serialProvider
View Full Code Here

     * @param stateString the Base64 encoded view state
     * @return the view state reconstructed from <code>stateString</code>
     */
    protected Object doGetState(String stateString) {
        ObjectInputStream ois = null;
        InputStream bis = new Base64InputStream(stateString);
        try {
            if (guard != null) {
                byte[] bytes = stateString.getBytes();
                int numRead = bis.read(bytes, 0, bytes.length);
                byte[] decodedBytes = new byte[numRead];
                bis.reset();
                bis.read(decodedBytes, 0, decodedBytes.length);

                bytes = guard.decrypt(decodedBytes);
                if (bytes == null) return null;
                bis = new ByteArrayInputStream(bytes);
            }
View Full Code Here

        if ("stateless".equals(stateString)) {
            return null;
        }
       
        ObjectInputStream ois = null;
        InputStream bis = new Base64InputStream(stateString);
        try {
            if (guard != null) {
                byte[] bytes = stateString.getBytes();
                int numRead = bis.read(bytes, 0, bytes.length);
                byte[] decodedBytes = new byte[numRead];
                bis.reset();
                bis.read(decodedBytes, 0, decodedBytes.length);

                bytes = guard.decrypt(decodedBytes);
                if (bytes == null) return null;
                bis = new ByteArrayInputStream(bytes);
            }
View Full Code Here

    private ObjectInputStream initInputStream(String stateString)
    throws IOException {

        InputStream bis;
        if (compressViewState) {
            bis = new GZIPInputStream(new Base64InputStream(stateString));
        } else {
            bis = new Base64InputStream(stateString);
        }

        ObjectInputStream ois;
        if (guard != null) {
            ois = serialProvider
View Full Code Here

            ObjectInputStream ois = null;

            try {
                InputStream bis;
                if (compressState) {
                    bis = new GZIPInputStream(new Base64InputStream(viewString));
                } else {
                    bis = new Base64InputStream(viewString);
                }
                if (guard != null) {
                    ois = serialProvider.createObjectInputStream(new CipherInputStream(bis, guard.getDecryptionCipher()));
                } else {
                    ois = serialProvider.createObjectInputStream(bis);
View Full Code Here

        if ("stateless".equals(stateString)) {
            return null;
        }
       
        ObjectInputStream ois = null;
        InputStream bis = new Base64InputStream(stateString);
        try {
            if (guard != null) {
                byte[] bytes = stateString.getBytes(RIConstants.CHAR_ENCODING);
                int numRead = bis.read(bytes, 0, bytes.length);
                byte[] decodedBytes = new byte[numRead];
                bis.reset();
                bis.read(decodedBytes, 0, decodedBytes.length);

                bytes = guard.decrypt(decodedBytes);
                if (bytes == null) return null;
                bis = new ByteArrayInputStream(bytes);
            }
View Full Code Here

     * @param stateString the Base64 encoded view state
     * @return the view state reconstructed from <code>stateString</code>
     */
    protected Object doGetState(String stateString) {
        ObjectInputStream ois = null;
        InputStream bis = new Base64InputStream(stateString);
        try {
            if (guard != null) {
                byte[] bytes = stateString.getBytes();
                int numRead = bis.read(bytes, 0, bytes.length);
                byte[] decodedBytes = new byte[numRead];
                bis.reset();
                bis.read(decodedBytes, 0, decodedBytes.length);

                bytes = guard.decrypt(decodedBytes);
                if (bytes == null) return null;
                bis = new ByteArrayInputStream(bytes);
            }
View Full Code Here

TOP

Related Classes of com.sun.faces.io.Base64InputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.