java.io

Class Reader

Implemented Interfaces:
Closeable, Readable
Known Direct Subclasses:
ASCIIReader, BufferedReader, CharArrayReader, CharIteratorReader, CharSequenceReader, DotTerminatedMessageReader, FilterReader, InputStreamReader, Latin1Reader, NullReader, PipedReader, SingleCharReader, StringReader, UCSReader, UTF8Reader, XmlFixerReader, XmlReader

public abstract class Reader
extends Object
implements Readable, Closeable

Abstract class for reading character streams. The only methods that a subclass must implement are read(char[], int, int) and close(). Most subclasses, however, will override some of the methods defined here in order to provide higher efficiency, additional functionality, or both.
Since:
JDK1.1
See Also:
BufferedReader, LineNumberReader, CharArrayReader, InputStreamReader, FileReader, FilterReader, PushbackReader, PipedReader, StringReader, Writer

Field Summary

protected Object
lock
The object used to synchronize operations on this stream.

Constructor Summary

Reader()
Create a new character-stream reader whose critical sections will synchronize on the reader itself.
Reader(Object lock)
Create a new character-stream reader whose critical sections will synchronize on the given object.

Method Summary

abstract void
close()
Close the stream.
void
mark(int readAheadLimit)
Mark the present position in the stream.
boolean
markSupported()
Tell whether this stream supports the mark() operation.
int
read()
Read a single character.
int
read(cbuf[] )
Read characters into an array.
abstract int
read(cbuf[] , int off, int len)
Read characters into a portion of an array.
int
read(CharBuffer target)
Attempts to read characters into the specified character buffer.
boolean
ready()
Tell whether this stream is ready to be read.
void
reset()
Reset the stream.
long
skip(long n)
Skip characters.

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

lock

protected Object lock
The object used to synchronize operations on this stream. For efficiency, a character-stream object may use an object other than itself to protect critical sections. A subclass should therefore use the object in this field rather than this or a synchronized method.

Constructor Details

Reader

protected Reader()
Create a new character-stream reader whose critical sections will synchronize on the reader itself.

Reader

protected Reader(Object lock)
Create a new character-stream reader whose critical sections will synchronize on the given object.
Parameters:
lock - The Object to synchronize on.

Method Details

close

public abstract void close()
            throws IOException
Close the stream. Once a stream has been closed, further read(), ready(), mark(), or reset() invocations will throw an IOException. Closing a previously-closed stream, however, has no effect.
Specified by:
close in interface Closeable
Throws:
IOException - If an I/O error occurs
Usages and Demos :

View More Examples of close()
   1:   {
   2:     Reader fr = null;
   3:     try
   4:         ...
   5:       if ( fr != null )
   6:         try { fr.close(); } catch ( IOException e ) { e.printStackTrace(); }
   7:     }
   8:   }
   9: }

View Full Code Here
   1: 
   2:     Reader in = theClob.getCharacterStream();
   3: 
   4:         ...
   5:     theParser.parse(in);
   6:     in.close();
   7: 
   8:     return theParser.getDocument();

View Full Code Here
   1: import java.io.InputStream;
   2: import java.io.Reader;
   3: 
   4:         ...
   5: public class IOCloser {
   6:     public static void perform(Reader reader, InputStream stream) {
   7:         try {
   8:         ...
   9:         if (reader != null) {
  10:             reader.close();
  11:             return;
  12:         ...
  13:         if (stream != null) {
  14:             stream.close();

View Full Code Here
   1: import java.io.InputStream;
   2: import java.io.Reader;
   3: import java.io.StringReader;
   4:         ...
   5: 
   6:         private Reader reader;
   7: 
   8:         ...
   9:         public void close() throws IOException {
  10:             reader.close();
  11:         }

View Full Code Here
   1: import java.io.PrintWriter;
   2: import java.io.Reader;
   3: import java.io.StringWriter;
   4:         ...
   5: 
   6:     private Reader getReader(String resource) {
   7:         return new InputStreamReader(this.getClass().getClassLoader()
   8:         ...
   9: 
  10:     protected String read(Reader in) throws IOException {
  11:         BufferedReader br = new BufferedReader(in);
  12:         ...
  13:         }
  14:         in.close();

View Full Code Here

mark

public void mark(int readAheadLimit)
            throws IOException
Mark the present position in the stream. Subsequent calls to reset() will attempt to reposition the stream to this point. Not all character-input streams support the mark() operation.
Parameters:
readAheadLimit - Limit on the number of characters that may be read while still preserving the mark. After reading this many characters, attempting to reset the stream may fail.
Throws:
IOException - If the stream does not support mark(), or if some other I/O error occurs
Usages and Demos :

View More Examples of mark(int readAheadLimit)
   1:     public static void main(String [] args) {
   2:         Reader pr = new Reader() {
   3:             private int counter = 0;
   4:         ...
   5:         try {
   6:             pr.mark(0);
   7:         } catch (IOException e) {
   8:             System.out.println(e.toString());
   9:         }

View Full Code Here
   1: import java.io.IOException;
   2: import java.io.Reader;
   3: 
   4:         ...
   5: class CRLFReader
   6:   extends Reader
   7: {
   8:         ...
   9: 
  10:   protected Reader in;
  11: 
  12:         ...
  13:       {
  14:         in.mark(1);

View Full Code Here
   1: 
   2:   public RDFReader(Reader in) {
   3: 
   4:         ...
   5:     if(state == INITIAL) {
   6:       in.mark(3);
   7:       char c1 = (char)in.read();
   8:         ...
   9:     InputStream inStream = old.getByteStream();
  10:     Reader in = inStream != null ? new InputStreamReader(inStream) : old.getCharacterStream();
  11: 
  12:         ...
  13: 
  14:     Reader in = new RDFReader(new BufferedReader(new InputStreamReader(new URL(args[0]).openStream())));

View Full Code Here
   1: import java.io.IOException;
   2: import java.io.Reader;
   3: import java.io.InputStream;
   4:         ...
   5: 
   6:     public static Reader open(InputSource inputSource) throws IOException {
   7:         if (inputSource.getCharacterStream() != null) {
   8:         ...
   9:     public static void closeIfOpened(InputSource inputSource,
  10:                                      Reader reader) throws IOException {
  11:         if ((inputSource.getCharacterStream() == null) 
  12:         ...
  13:         char[] buf = new char[XML_DOCUMENT_HEADER_PREFIX.length()];
  14:         reader.mark(XML_DOCUMENT_HEADER_PREFIX.length()+1);

View Full Code Here
   1: import java.io.IOException;
   2: import java.io.Reader;
   3: import java.io.InputStream;
   4:         ...
   5: 
   6:     public static Reader open(InputSource inputSource) throws IOException {
   7:         if (inputSource.getCharacterStream() != null) {
   8:         ...
   9:     public static void closeIfOpened(InputSource inputSource,
  10:                                      Reader reader) throws IOException {
  11:         if ((inputSource.getCharacterStream() == null) 
  12:         ...
  13:         char[] buf = new char[XML_DOCUMENT_HEADER_PREFIX.length()];
  14:         reader.mark(XML_DOCUMENT_HEADER_PREFIX.length()+1);

View Full Code Here

markSupported

public boolean markSupported()
Tell whether this stream supports the mark() operation. The default implementation always returns false. Subclasses should override this method.
Returns:
true if and only if this stream supports the mark operation.
Usages and Demos :

View More Examples of markSupported()
   1: import java.io.IOException;
   2: import java.io.Reader;
   3: 
   4:         ...
   5: class CRLFReader
   6:   extends Reader
   7: {
   8:         ...
   9: 
  10:   protected Reader in;
  11: 
  12:         ...
  13:   {
  14:     if (!in.markSupported())

View Full Code Here
   1: 
   2: import java.io.Reader;
   3: import java.io.PushbackReader;
   4:         ...
   5: 
   6: public class LinebreakPreservingReader extends Reader {
   7: 
   8:         ...
   9: 
  10:     public LinebreakPreservingReader(Reader in) {
  11:         this.in = new PushbackReader(in);
  12:         ...
  13:     public boolean markSupported() {
  14:         return in.markSupported();

View Full Code Here
   1: import java.io.IOException;
   2: import java.io.Reader;
   3: 
   4:         ...
   5: 
   6:   private Reader reader;
   7:   private String encoding;
   8:         ...
   9:   {
  10:     return reader.markSupported();
  11:   }

View Full Code Here
   1: 
   2:     private final Reader _reader;
   3: 
   4:         ...
   5: 
   6:     public ClobImpl(Reader reader, long length) {
   7:         _reader = reader;
   8:         ...
   9:             public boolean markSupported() {
  10:                 return _reader.markSupported();
  11:             }

View Full Code Here
   1: import java.io.IOException;
   2: import java.io.Reader;
   3: import java.io.StringReader;
   4:         ...
   5: 
   6:   Reader in;
   7:   XPathToken token;
   8:         ...
   9: 
  10:   XPathTokenizer (Reader in)
  11:   {
  12:         ...
  13:     this.in = in.markSupported() ? in : new BufferedReader (in);

View Full Code Here

read

public int read()
            throws IOException
Read a single character. This method will block until a character is available, an I/O error occurs, or the end of the stream is reached.

Subclasses that intend to support efficient single-character input should override this method.

Returns:
The character read, as an integer in the range 0 to 65535 (0x00-0xffff), or -1 if the end of the stream has been reached
Throws:
IOException - If an I/O error occurs
Usages and Demos :

View More Examples of read()
   1: import java.io.InputStream;
   2: import java.io.Reader;
   3: 
   4:         ...
   5:     
   6:     private Reader reader;
   7:     
   8:         ...
   9:     public int read() throws IOException {
  10:         return reader.read();
  11:     }

View Full Code Here
   1: import java.io.InputStream;
   2: import java.io.Reader;
   3: import java.io.StringReader;
   4:         ...
   5: 
   6:         private Reader reader;
   7: 
   8:         ...
   9:         public int read() throws IOException {
  10:             return reader.read();
  11:         }

View Full Code Here
   1: import java.io.InputStream;
   2: import java.io.Reader;
   3: public class ReaderInputStream extends InputStream {
   4:         ...
   5:     private Reader reader = null;
   6:     public ReaderInputStream(Reader reader) {
   7:         ...
   8:     public int read() throws IOException {
   9:         return reader.read();
  10:     }

View Full Code Here
   1: import java.io.InputStream;
   2: import java.io.Reader;
   3: public class ReaderInputStream extends InputStream {
   4:         ...
   5:     private Reader reader = null;
   6:     public ReaderInputStream(Reader reader) {
   7:         ...
   8:     public int read() throws IOException {
   9:         return reader.read();
  10:     }

View Full Code Here
   1: import java.io.InputStreamReader;
   2: import java.io.Reader;
   3: 
   4:         ...
   5: 
   6:     protected Reader reader;
   7: 
   8:         ...
   9:     public int readChar() throws IOException {
  10:         return reader.read();
  11:     }

View Full Code Here

read

public int read(cbuf[] )
            throws IOException
Read characters into an array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached.
Parameters:
Returns:
The number of characters read, or -1 if the end of the stream has been reached
Throws:
IOException - If an I/O error occurs
Usages and Demos :

View More Examples of read(cbuf[] )
   1: import java.io.InputStream;
   2: import java.io.Reader;
   3: 
   4:         ...
   5:     public int describe(InputStream contents, IContentDescription description) throws IOException {
   6:         Reader reader = null;
   7:         try {
   8:         ...
   9:             char[] chars = new char[BUFFER_SIZE];
  10:             reader.read(chars);
  11:             String str = new String(chars);

View Full Code Here
   1: 
   2: import java.io.Reader;
   3: import java.io.PushbackReader;
   4:         ...
   5: 
   6: public class LinebreakPreservingReader extends Reader {
   7: 
   8:         ...
   9: 
  10:     public LinebreakPreservingReader(Reader in) {
  11:         this.in = new PushbackReader(in);
  12:         ...
  13:     public int read(char[] cbuf) throws IOException {
  14:         return in.read(cbuf);

View Full Code Here
   1: 
   2:     private final Reader _reader;
   3: 
   4:         ...
   5: 
   6:     public ClobImpl(Reader reader, long length) {
   7:         _reader = reader;
   8:         ...
   9:             _reader.skip(pos - 1);
  10:             _reader.read(buf);
  11:         } catch (IOException ex) {

View Full Code Here
   1: 
   2: import java.io.Reader;
   3: import org.apache.lucene.analysis.Analyzer;
   4:         ...
   5: 
   6:     public TokenStream tokenStream(String fieldName, Reader reader) {
   7: 
   8:         ...
   9:             try {
  10:                 int len = reader.read(buf);
  11:                 while(len != -1){
  12:         ...
  13:                     sb.append(buf, 0, len);
  14:                     len = reader.read(buf);

View Full Code Here
   1:     {
   2:         Reader r = new BufferedReader(asUTF8(in),1024) ;
   3:         return readWholeFileAsUTF8(r) ;
   4:         ...
   5:     
   6:     private static String readWholeFileAsUTF8(Reader r) throws IOException
   7:     {
   8:         ...
   9:         while (r.ready()) {
  10:             int l = r.read(buff);
  11:             if (l <= 0)

View Full Code Here

read

public abstract int read(cbuf[] ,
                         int off,
                         int len)
            throws IOException
Read characters into a portion of an array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached.
Parameters:
off - Offset at which to start storing characters
len - Maximum number of characters to read
Returns:
The number of characters read, or -1 if the end of the stream has been reached
Throws:
IOException - If an I/O error occurs
Usages and Demos :

View More Examples of read(cbuf[] ,int off,int len)
   1:     protected LineHandler handler;
   2:     protected Reader input;
   3:     protected boolean needToClose;
   4:         ...
   5: 
   6:     public LineReader(Reader input, int sz, LineHandler handler, boolean needToClose){
   7:         super(sz);
   8:         ...
   9: 
  10:     public LineReader(Reader input, LineHandler handler, boolean needToClose){
  11:         this(input, defaultCharBufferSize, handler, needToClose);
  12:         ...
  13:     protected int fill(char[] c, int offset, int size) throws IOException {
  14:         return input.read(c, offset, size);

View Full Code Here
   1: import java.io.IOException;
   2: import java.io.Reader;
   3: 
   4:         ...
   5: public class SuppressCloseReader extends Reader {
   6: 
   7:         ...
   8:     private Reader inner;
   9: 
  10:         ...
  11:     public int read(char[] cbuf, int off, int len) throws IOException {
  12:         return inner.read(cbuf, off, len);

View Full Code Here
   1: 
   2: import java.io.Reader;
   3: import java.io.PushbackReader;
   4:         ...
   5: 
   6: public class LinebreakPreservingReader extends Reader {
   7: 
   8:         ...
   9: 
  10:     public LinebreakPreservingReader(Reader in) {
  11:         this.in = new PushbackReader(in);
  12:         ...
  13:     public int read(char[] cbuf, int off, int len) throws IOException {
  14:         return in.read(cbuf, off, len);

View Full Code Here
   1:     
   2:     static private class MyReader extends Reader {
   3:         ...
   4:         private Reader s;
   5:         ...
   6:         public MyReader(Reader     s) {
   7:             this.s = s;
   8:         ...
   9:         public int read(char [] b, int off, int len) throws IOException {
  10:             return s.read(b, off, len);

View Full Code Here
   1: import java.io.IOException;
   2: import java.io.Reader;
   3: import java.io.StringReader;
   4:         ...
   5: 
   6:             while (!complete && (intChar = reader.read()) != -1) {
   7:                 c = (char) intChar;
   8:         ...
   9: 
  10:             while (!complete && (intChar = reader.read()) != -1) {
  11:                 c = (char) intChar;
  12:         ...
  13:             reader.mark(10);
  14:             reader.read(buf, 0, 10);

View Full Code Here

read

public int read(CharBuffer target)
            throws IOException
Attempts to read characters into the specified character buffer. The buffer is used as a repository of characters as-is: the only changes made are the results of a put operation. No flipping or rewinding of the buffer is performed.
Specified by:
read in interface Readable
Parameters:
target - the buffer to read characters into
Returns:
The number of characters added to the buffer, or -1 if this source of characters is at its end
Throws:
IOException - if an I/O error occurs
NullPointerException - if target is null
Usages and Demos :

View More Examples of read(java.nio.CharBuffer target)
   1: import java.io.InputStream;
   2: import java.io.Reader;
   3: 
   4:         ...
   5:     public int describe(InputStream contents, IContentDescription description) throws IOException {
   6:         Reader reader = null;
   7:         try {
   8:         ...
   9:             char[] chars = new char[BUFFER_SIZE];
  10:             reader.read(chars);
  11:             String str = new String(chars);

View Full Code Here
   1: 
   2: import java.io.Reader;
   3: import java.io.PushbackReader;
   4:         ...
   5: 
   6: public class LinebreakPreservingReader extends Reader {
   7: 
   8:         ...
   9: 
  10:     public LinebreakPreservingReader(Reader in) {
  11:         this.in = new PushbackReader(in);
  12:         ...
  13:     public int read(char[] cbuf) throws IOException {
  14:         return in.read(cbuf);

View Full Code Here
   1: 
   2:     private final Reader _reader;
   3: 
   4:         ...
   5: 
   6:     public ClobImpl(Reader reader, long length) {
   7:         _reader = reader;
   8:         ...
   9:             _reader.skip(pos - 1);
  10:             _reader.read(buf);
  11:         } catch (IOException ex) {

View Full Code Here
   1: 
   2: import java.io.Reader;
   3: import org.apache.lucene.analysis.Analyzer;
   4:         ...
   5: 
   6:     public TokenStream tokenStream(String fieldName, Reader reader) {
   7: 
   8:         ...
   9:             try {
  10:                 int len = reader.read(buf);
  11:                 while(len != -1){
  12:         ...
  13:                     sb.append(buf, 0, len);
  14:                     len = reader.read(buf);

View Full Code Here
   1:     {
   2:         Reader r = new BufferedReader(asUTF8(in),1024) ;
   3:         return readWholeFileAsUTF8(r) ;
   4:         ...
   5:     
   6:     private static String readWholeFileAsUTF8(Reader r) throws IOException
   7:     {
   8:         ...
   9:         while (r.ready()) {
  10:             int l = r.read(buff);
  11:             if (l <= 0)

View Full Code Here

ready

public boolean ready()
            throws IOException
Tell whether this stream is ready to be read.
Returns:
True if the next read() is guaranteed not to block for input, false otherwise. Note that returning false does not guarantee that the next read will block.
Throws:
IOException - If an I/O error occurs
Usages and Demos :

View More Examples of ready()
   1:     public static void main(String [] args) {
   2:         Reader pr = new Reader() {
   3:             private int counter = 0;
   4:         ...
   5:         try {
   6:             System.out.println(pr.ready());
   7:         } catch (IOException e) {
   8:             System.out.println(e.toString());
   9:         }

View Full Code Here
   1: 
   2: import java.io.Reader;
   3: import java.io.FilterReader;
   4:         ...
   5: 
   6:   public EscapedUnicodeReader(Reader in) {
   7:     super(in);
   8:         ...
   9:     if (pushback!=-1) return true;
  10:     else return in.ready();
  11:   }

View Full Code Here
   1: import java.io.IOException;
   2: import java.io.Reader;
   3: 
   4:         ...
   5: 
   6:     private Reader fReader;
   7:     private boolean fWasWhiteSpace;
   8:         ...
   9: 
  10:     protected SubstitutionTextReader(Reader reader) {
  11:         fReader= reader;
  12:         ...
  13:     public boolean ready() throws IOException {
  14:         return fReader.ready();

View Full Code Here
   1: import java.io.IOException;
   2: import java.io.Reader;
   3: 
   4:         ...
   5: 
   6:     private Reader fReader;
   7:     protected boolean fWasWhiteSpace;
   8:         ...
   9: 
  10:     protected SubstitutionTextReader(Reader reader) {
  11:         fReader= reader;
  12:         ...
  13:     public boolean ready() throws IOException {
  14:         return fReader.ready();

View Full Code Here
   1: import java.io.IOException;
   2: import java.io.Reader;
   3: 
   4:         ...
   5: public class LazyReader extends Reader {
   6:     private int blockCapacity;
   7:         ...
   8:     private int bufferSize;
   9:     private Reader in;
  10:     private int mark;
  11:         ...
  12:         try {
  13:             return (bufferSize - offset) > 0 || in.ready();

View Full Code Here

reset

public void reset()
            throws IOException
Reset the stream. If the stream has been marked, then attempt to reposition it at the mark. If the stream has not been marked, then attempt to reset it in some way appropriate to the particular stream, for example by repositioning it to its starting point. Not all character-input streams support the reset() operation, and some support reset() without supporting mark().
Throws:
IOException - If the stream has not been marked, or if the mark has been invalidated, or if the stream does not support reset(), or if some other I/O error occurs
Usages and Demos :

View More Examples of reset()
   1:     public static void main(String [] args) {
   2:         Reader pr = new Reader() {
   3:             private int counter = 0;
   4:         ...
   5:         try {
   6:             pr.reset();
   7:         }
   8:         catch (IOException e) {
   9:             System.out.println(e.toString());

View Full Code Here
   1: import java.io.InputStream;
   2: import java.io.Reader;
   3: import java.io.StringReader;
   4:         ...
   5: 
   6:         private Reader reader;
   7: 
   8:         ...
   9:         public synchronized void reset() throws IOException {
  10:             reader.reset();
  11:         }

View Full Code Here
   1: import java.io.IOException;
   2: import java.io.Reader;
   3: 
   4:         ...
   5: 
   6:     private Reader fReader;
   7:     private boolean fWasWhiteSpace;
   8:         ...
   9: 
  10:     protected SubstitutionTextReader(Reader reader) {
  11:         fReader= reader;
  12:         ...
  13:     public void reset() throws IOException {
  14:         fReader.reset();

View Full Code Here
   1: import java.io.IOException;
   2: import java.io.Reader;
   3: 
   4:         ...
   5: 
   6:     private Reader fReader;
   7:     protected boolean fWasWhiteSpace;
   8:         ...
   9: 
  10:     protected SubstitutionTextReader(Reader reader) {
  11:         fReader= reader;
  12:         ...
  13:     public void reset() throws IOException {
  14:         fReader.reset();

View Full Code Here
   1: import java.io.IOException;
   2: import java.io.Reader;
   3: 
   4:         ...
   5: 
   6: public abstract class SubstitutionTextReader extends Reader {
   7:     
   8:         ...
   9:     private Reader fReader;
  10:     private boolean fWasWhiteSpace;
  11:         ...
  12:     public void reset() throws IOException {
  13:         fReader.reset();

View Full Code Here

skip

public long skip(long n)
            throws IOException
Skip characters. This method will block until some characters are available, an I/O error occurs, or the end of the stream is reached.
Parameters:
n - The number of characters to skip
Returns:
The number of characters actually skipped
Throws:
IllegalArgumentException - If n is negative.
IOException - If an I/O error occurs
Usages and Demos :

View More Examples of skip(long n)
   1:     public static void main(String [] args) {
   2:         Reader pr = new Reader() {
   3:             private int counter = 0;
   4:         ...
   5:         try {
   6:             System.out.println(pr.skip(10000));
   7:         } catch (IOException e) {
   8:             System.out.println(e.toString());
   9:         }

View Full Code Here
   1: import java.io.InputStream;
   2: import java.io.Reader;
   3: import java.io.StringReader;
   4:         ...
   5: 
   6:         private Reader reader;
   7: 
   8:         ...
   9:         public long skip(long n) throws IOException {
  10:             return reader.skip(n);
  11:         }

View Full Code Here
   1: import java.io.InputStream;
   2: import java.io.Reader;
   3: import java.io.IOException;
   4:         ...
   5: 
   6:     private final Reader data;
   7:     private char[]    conv;
   8:         ...
   9: 
  10:     public ReaderToAscii(Reader data) 
  11:     {
  12:         ...
  13: 
  14:         return data.skip(len);

View Full Code Here
   1: import java.io.IOException;
   2: import java.io.Reader;
   3: 
   4:         ...
   5: class CRLFReader
   6:   extends Reader
   7: {
   8:         ...
   9: 
  10:   protected Reader in;
  11: 
  12:         ...
  13:   {
  14:     return in.skip(n);

View Full Code Here
   1: 
   2: import java.io.Reader;
   3: import java.io.PushbackReader;
   4:         ...
   5: 
   6: public class LinebreakPreservingReader extends Reader {
   7: 
   8:         ...
   9: 
  10:     public LinebreakPreservingReader(Reader in) {
  11:         this.in = new PushbackReader(in);
  12:         ...
  13:     public long skip(long n) throws IOException {
  14:         return in.skip(n);

View Full Code Here