Package com.volantis.shared.content

Examples of com.volantis.shared.content.ContentStyle


            throws IOException, SAXException {

        XMLReader xmlReader = createValidatingReader(true);

        InputSource inputSource;
        ContentStyle contentStyle = content.getContentStyle();
        if (contentStyle == ContentStyle.BINARY) {
            inputSource = new InputSource(content.getInputStream());
        } else if (contentStyle == ContentStyle.TEXT) {
            inputSource = new InputSource(content.getReader());
        } else {
View Full Code Here


        Object readObject = null;

        IBindingFactory bfact = BindingDirectory.getFactory(expectedClass);
        IUnmarshallingContext uctx = bfact.createUnmarshallingContext();

        ContentStyle contentStyle = content.getContentStyle();
        if (contentStyle == ContentStyle.BINARY) {
            readObject = uctx.unmarshalDocument(content.getInputStream(), name,
                    null); // null encoding means auto-detect
        } else if (contentStyle == ContentStyle.TEXT) {
            readObject = uctx.unmarshalDocument(content.getReader(), name);
View Full Code Here

        // Tell the parser to locally resolve the XHTML 2 DTD if specified.
        xmlReader.setEntityResolver(xhtmlDtdResolver);

        // Treat the response wrapper as an InputSource for the XML parser.
        InputSource inputSource;
        ContentStyle contentStyle = xdimeContent.getContentStyle();
        if (contentStyle == ContentStyle.BINARY) {
            inputSource = new InputSource(new ByteArrayInputStream(
                    xdimeContent.getAsByteArray()));
        } else if (contentStyle == ContentStyle.TEXT) {
            inputSource = new InputSource(new CharArrayReader(
View Full Code Here

    //javadoc inherited
    public String getXDIMEString(CachedContent xdimeContent)
            throws IOException {
        String xdimeString;
        final ContentStyle contentStyle = xdimeContent.getContentStyle();
        if (contentStyle == ContentStyle.BINARY) {
            // Content is binary. We know it is XDIME but we do not know the
            // character set as that is buried in the XML declaration.
            //
            // So, we should scan the declaration to find the charset.
View Full Code Here

                handledResponse = true;

                // Split the result where the session ID should be
                // inserted, and store it in the rendered page wrapper.
                byte[] cacheContent;
                ContentStyle contentStyle = cachingResponse.getContentStyle();
                if (contentStyle == ContentStyle.TEXT) {
                    // content is text, convert to bytes for storage
                    // NOTE: this is not 100% efficient but we don't care as
                    // the caching is broken at the moment anyway.
                    cacheContent = new String(cachingResponse.getAsCharArray()).
View Full Code Here

                    DevicePolicyConstants.SUPPORTS_WML_ACCESSKEY_AUTOMAGIC_NUMBER_DISPLAY);
    }

    // Javadoc inherited.
    protected ContentStyle calculateOutputStyle() {
        ContentStyle outputStyle;

        // Calculate the output style for WML.
        //
        // In this case the output style depends on whether we are generating
        // WMLC so we must calculate that first.
View Full Code Here

TOP

Related Classes of com.volantis.shared.content.ContentStyle

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.