Examples of EncodingStateRegistry


Examples of org.grails.encoder.EncodingStateRegistry

            }

            public LazyInitializingWriter[] initializeMultiple(StreamCharBuffer buffer, boolean autoFlushMode) throws IOException {
                Encoder encoder = encoderLookup.getEncoder();
                if (encoder != null) {
                    EncodingStateRegistry encodingStateRegistry = encodingStateRegistryLookup.lookup();
                    StreamCharBuffer encodeBuffer=new StreamCharBuffer(chunkSize, growProcent, maxChunkSize);
                    encodeBuffer.setAllowSubBuffers(false);
                    lazyWriter=encodeBuffer.getWriterForEncoder(encoder, encodingStateRegistry);
                    for(LazyInitializingWriter w : writers) {
                        encodeBuffer.connectTo(w, autoFlushMode);
View Full Code Here

Examples of org.grails.encoder.EncodingStateRegistry

        public Object encode(Object target) {
            if (target instanceof Encodeable) {
                return ((Encodeable)target).encode(this);
            }

            EncodingStateRegistry encodingState=lookupEncodingState();
            if (encodingState != null && target instanceof CharSequence) {
                if (!encodingState.shouldEncodeWith(this, (CharSequence)target)) {
                    return target;
                }
            }
            Object encoded = delegate.encode(target);
            if (encodingState != null && encoded instanceof CharSequence)
                encodingState.registerEncodedWith(this, (CharSequence)encoded);
            return encoded;
        }
View Full Code Here

Examples of org.grails.encoder.EncodingStateRegistry

            EncodingStateRegistryLookup encodingStateRegistryLookup = EncodingStateRegistryLookupHolder.getEncodingStateRegistryLookup();
            return encodingStateRegistryLookup != null ? encodingStateRegistryLookup.lookup() : null;
        }

        public void markEncoded(CharSequence string) {
            EncodingStateRegistry encodingState=lookupEncodingState();
            if (encodingState != null) {
                encodingState.registerEncodedWith(this, string);
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.