equal
deleted
inserted
replaced
12 import scala.util.matching.Regex |
12 import scala.util.matching.Regex |
13 import scala.util.parsing.input.{OffsetPosition, Position => InputPosition, |
13 import scala.util.parsing.input.{OffsetPosition, Position => InputPosition, |
14 Reader, CharSequenceReader, PagedSeq} |
14 Reader, CharSequenceReader, PagedSeq} |
15 import scala.util.parsing.combinator.RegexParsers |
15 import scala.util.parsing.combinator.RegexParsers |
16 import java.io.{File => JFile, BufferedInputStream, FileInputStream, InputStream} |
16 import java.io.{File => JFile, BufferedInputStream, FileInputStream, InputStream} |
17 import java.net.URL |
|
18 |
17 |
19 |
18 |
20 object Scan { |
19 object Scan { |
21 /** context of partial line-oriented scans **/ |
20 /** context of partial line-oriented scans **/ |
22 |
21 |
425 } |
424 } |
426 |
425 |
427 def byte_reader(file: JFile): Byte_Reader = |
426 def byte_reader(file: JFile): Byte_Reader = |
428 make_byte_reader(new FileInputStream(file), file.length.toInt) |
427 make_byte_reader(new FileInputStream(file), file.length.toInt) |
429 |
428 |
430 def byte_reader(url: URL): Byte_Reader = { |
429 def byte_reader(url: Url): Byte_Reader = { |
431 val connection = url.openConnection |
430 val connection = url.open_connection() |
432 val stream = connection.getInputStream |
431 val stream = connection.getInputStream |
433 val stream_length = connection.getContentLength |
432 val stream_length = connection.getContentLength |
434 make_byte_reader(stream, stream_length) |
433 make_byte_reader(stream, stream_length) |
435 } |
434 } |
436 |
435 |