Package java.io

Examples of java.io.FilterReader


                    (PropertyId) null, ItemState.STATUS_EXISTING, true);
            state.setValues(new InternalValue[] { value });
            Map fields = filter.doFilter(state, encoding);
            Object fulltext = fields.get(FieldNames.FULLTEXT);
            if (fulltext instanceof Reader) {
                return new FilterReader((Reader) fulltext) {
                    public void close() throws IOException {
                        super.close();
                        ((BLOBFileValue) value.internalValue()).discard();
                    }
                };
View Full Code Here


                    (PropertyId) null, ItemState.STATUS_EXISTING, true);
            state.setValues(new InternalValue[] { value });
            Map fields = filter.doFilter(state, encoding);
            Object fulltext = fields.get(FieldNames.FULLTEXT);
            if (fulltext instanceof Reader) {
                return new FilterReader((Reader) fulltext) {
                    public void close() throws IOException {
                        super.close();
                        value.getBLOBFileValue().discard();
                    }
                };
View Full Code Here

  private static CheckCloseSupplier.Input<Reader> newCheckReader(
      InputSupplier<? extends Reader> delegate) {
    return new CheckCloseSupplier.Input<Reader>(delegate) {
      @Override protected Reader wrap(Reader object, final Callback callback) {
        return new FilterReader(object) {
          @Override public void close() throws IOException {
            callback.delegateClosed();
            super.close();
          }
        };
View Full Code Here

                }
            }
            this.internalReader =
                    new UTF8Reader(csd, conChild, synchronizationObject);
            this.unclosableInternalReader =
                    new FilterReader(this.internalReader) {
                        public void close() {
                            // Do nothing.
                            // Stream will be closed when the Clob is released.
                        }
                    };
View Full Code Here

            // getCSD obtains a descriptor for the stream to allow the reader
            // to configure itself.
            this.internalReader = new UTF8Reader(getCSD(), conChild,
                    conChild.getConnectionSynchronization());
            this.unclosableInternalReader =
                    new FilterReader(this.internalReader) {
                        public void close() {
                            // Do nothing.
                            // Stream will be closed when the Clob is released.
                        }
                    };
View Full Code Here

            throw new ConfigException.BugOrBroken("Java runtime does not support UTF-8", e);
        }
    }

    private static Reader doNotClose(Reader input) {
        return new FilterReader(input) {
            @Override
            public void close() {
                // NOTHING.
            }
        };
View Full Code Here

                }
            }
        }
        final Reader finalReader = instream;
        return classLoadersToCleanUp.size() == 0 ? finalReader
            : new FilterReader(finalReader) {
                    public void close() throws IOException {
                        FileUtils.close(in);
                        cleanUpClassLoaders(classLoadersToCleanUp);
                    }
                    protected void finalize() throws Throwable {
View Full Code Here

      case 0:
        reader = new StringReader(new String(chars));
        reader2 = new StringReader(new String(chars));
        break;
      case 1:
        reader = new FilterReader(new StringReader(new String(chars))) {
        };
        reader2 = new FilterReader(new StringReader(new String(chars))) {
        };
        break;
      default:
        reader = new CharArrayReader(chars);
        reader2 = new CharArrayReader(chars);
View Full Code Here

            // getCSD obtains a descriptor for the stream to allow the reader
            // to configure itself.
            this.internalReader = new UTF8Reader(getCSD(), conChild,
                    conChild.getConnectionSynchronization());
            this.unclosableInternalReader =
                    new FilterReader(this.internalReader) {
                        public void close() {
                            // Do nothing.
                            // Stream will be closed when the Clob is released.
                        }
                    };
View Full Code Here

            throw new ConfigException.BugOrBroken("Java runtime does not support UTF-8", e);
        }
    }

    private static Reader doNotClose(final Reader input) {
        return new FilterReader(input) {
            @Override
            public void close() {
                // NOTHING.
            }
        };
View Full Code Here

TOP

Related Classes of java.io.FilterReader

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.