Package java.io

Examples of java.io.FilterReader


      public static final Character VALUE_SEPARATOR = ',';
      public static final Character EOF = '\uFFFF';

      public Tokenizer(Reader in) {
         m_chBack = -1;
         m_in = new FilterReader(in) {
            public int read() throws IOException {
               if (m_chBack != -1) {
                  int ch = m_chBack;
                  m_chBack = -1;
                  return ch;
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

                }
            }
        }
        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

            // 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

  /**
   * Returns a reader wrapping the given reader that only reads half of the maximum number of
   * characters that it could read in read(char[], int, int).
   */
  private static Reader newNonBufferFillingReader(Reader reader) {
    return new FilterReader(reader) {
      @Override
      public int read(char[] cbuf, int off, int len) throws IOException {
        // if a buffer isn't being cleared correctly, this method will eventually start being called
        // with a len of 0 forever
        if (len <= 0) {
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

    @Test
    public void testCloningFilterStringReader() throws IOException {
        // The (useless) FilterReader should be unwrapped, and a StringReaderCloner should be returned
        StringReader stringReader = new StringReader("test string");
        FilterReader reader = new PushbackReader(stringReader);
        ReaderCloneFactory.ReaderCloner<Reader> cloner = ReaderCloneFactory.getCloner(reader);
        assertNotNull(cloner);
        assertEquals(StringReaderCloner.class, cloner.getClass());
        Reader clone;
        clone = cloner.giveAClone();
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

                }
            }
            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

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.