class SourceReader extends Reader
Provides a java.io.Reader that is backed by a Scala Source object.
- Alphabetic
- By Inheritance
- SourceReader
- Reader
- Closeable
- AutoCloseable
- Readable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new SourceReader(sourceToWrap: Source)
- sourceToWrap
the source to wrap
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def close(): Unit
Closes the
Readerby closing the underlyingSource.Closes the
Readerby closing the underlyingSource.- Definition Classes
- SourceReader → Reader → Closeable → AutoCloseable
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def mark(readAheadLimit: Int): Unit
mark()is not supported.mark()is not supported. This method unconditionally throwsIOException.- readAheadLimit
the mark limit. Ignored.
- Definition Classes
- SourceReader → Reader
- Annotations
- @SuppressWarnings()
- def markSupported(): Boolean
Return whether
mark()is supported.Return whether
mark()is supported. This version always returnsfalse.- returns
false
- Definition Classes
- SourceReader → Reader
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def read(): Int
Reads a single character.
Reads 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.
- returns
the character read, as an integer in the range 0x00 to 0xffff, or -1 if at the end of the underlying
Source.
- Definition Classes
- SourceReader → Reader
- def read(buf: Array[Char], offset: Int, length: Int): Int
Reads characters into a portion of an array.
Reads 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 underlying
Sourceis reached.- buf
the destination character buffer
- offset
offset at which to start reading into the buffer
- length
maximum number of characters to read
- returns
total number of characters read, or -1 on EOF.
- Definition Classes
- SourceReader → Reader
- def read(arg0: Array[Char]): Int
- Definition Classes
- Reader
- Annotations
- @throws(classOf[java.io.IOException])
- def read(arg0: CharBuffer): Int
- Definition Classes
- Reader → Readable
- Annotations
- @throws(classOf[java.io.IOException])
- def ready(): Boolean
Tells whether the
Readeris ready to be read.Tells whether the
Readeris ready to be read. TheReaderAPi states that this method "returnstrueif the nextread()is guaranteed not to block for input,falseotherwise. Note that returningfalsedoes not guarantee that the next read will block."There's no simple mapping of
ready()to aSource, so this method always returnsfalse.- returns
false, unconditionally.
- Definition Classes
- SourceReader → Reader
- def reset(): Unit
Resets the
Readerby resetting the underlyingSource.Resets the
Readerby resetting the underlyingSource.- Definition Classes
- SourceReader → Reader
- def skip(n: Long): Long
Skips characters.
Skips characters. This method will block until some characters are available, an I/O error occurs, or the end of the underlying
Sourceis reached.- n
the number of characters to skip
- returns
the number of characters actually skipped
- Definition Classes
- SourceReader → Reader
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()