object IOTable
The methods here are basically copies of the same methods in Table, but resulting in IO rather than Try.
- Alphabetic
- By Inheritance
- IOTable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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
- def apply[X](xs: Iterable[X], maybeHeader: Option[Header]): Table[X]
Method to construct one of the standard table types, given an Iterable of T and an optional header.
Method to construct one of the standard table types, given an Iterable of T and an optional header.
- X
the underlying type of xs.
- xs
an Iterable of X.
- maybeHeader
an optional Header.
- returns
a Table[X] which is either a HeadedTable or an UnheadedTable, as appropriate.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def parse[T](u: => URI, enc: String)(implicit arg0: TableParser[T]): IO[T]
Method to parse a table from a URI with an explicit encoding.
Method to parse a table from a URI with an explicit encoding.
- T
the type of the resulting table.
- u
the URI.
- enc
the encoding.
- returns
an IO[T]
- def parse[T](u: => URI)(implicit arg0: TableParser[T], codec: Codec): IO[T]
Method to parse a table from a URI with an implicit encoding.
Method to parse a table from a URI with an implicit encoding.
- T
the type of the resulting table.
- u
the URI.
- codec
(implicit) the encoding.
- returns
an IO[T]
- def parse[T](si: => IO[Source])(implicit arg0: TableParser[T]): IO[T]
Method to parse a table from a Source (with proper resource management of the source).
Method to parse a table from a Source (with proper resource management of the source).
- T
the type of the resulting table.
- si
the Source.
- returns
an IO[T]
- def parse[T](ws: Iterable[String])(implicit arg0: TableParser[T]): IO[T]
Method to parse a table from an Iterable of String.
Method to parse a table from an Iterable of String.
- T
the type of the resulting table.
- ws
the Strings.
- returns
an IO[T]
- def parse[T](ws: Iterator[String], n: Int)(implicit arg0: TableParser[T]): IO[T]
Primary method to parse a table from an Iterator of String.
Primary method to parse a table from an Iterator of String. This method is, in turn, invoked by all other parse methods defined below (other than parseSequence).
- T
the type of the resulting table.
- ws
the Strings.
- returns
an IO[T]
- def parseFile[T](pathname: String)(implicit arg0: TableParser[T], codec: Codec): IO[T]
Method to parse a table from an File.
Method to parse a table from an File.
- T
the type of the resulting table.
- pathname
the file pathname.
- codec
(implicit) the encoding.
- returns
a IO[T]
- def parseFile[T](pathname: String, enc: String)(implicit arg0: TableParser[T]): IO[T]
Method to parse a table from a File.
Method to parse a table from a File.
- T
the type of the resulting table.
- pathname
the file pathname.
- enc
the explicit encoding.
- returns
an IO[T]
- def parseFile[T](f: => File)(implicit arg0: TableParser[T], codec: Codec): IO[T]
Method to parse a table from an File.
Method to parse a table from an File.
NOTE: you should use parseFile(String) if you have a pathname in String form.
TESTME
- T
the type of the resulting table.
- f
the File (call by name in case there is an exception thrown while constructing the file).
- codec
(implicit) the encoding.
- returns
an IO[T]
- def parseFile[T](f: => File, enc: String)(implicit arg0: TableParser[T]): IO[T]
Method to parse a table from a File.
Method to parse a table from a File.
NOTE: you should use parseFile(String) if you have a pathname in String form.
TESTME
- T
the type of the resulting table.
- f
the File (call by name in case there is an exception thrown while constructing the file).
- enc
the explicit encoding.
- returns
an IO[T]
- def parseFileRaw(pathname: String, predicate: (Try[RawRow]) => Boolean)(implicit codec: Codec): IO[Table[RawRow]]
Method to parse a table from a File as a table of Seq[String].
Method to parse a table from a File as a table of Seq[String].
- pathname
the path name.
- codec
(implicit) the encoding.
- returns
an IO of Table[RawRow] where RawRow is a Seq[String].
- def parseFileRaw(f: File, predicate: (Try[RawRow]) => Boolean, maybeFixedHeader: Option[Header] = None, forgiving: Boolean = true)(implicit codec: Codec): IO[Table[RawRow]]
Method to parse a table from a File as a table of Seq[String].
Method to parse a table from a File as a table of Seq[String].
- f
the file.
- maybeFixedHeader
an optional fixed header. If None (the default), we expect to find the header defined in the first line of the file.
- forgiving
forcing (defaults to true). If true (the default) then an individual malformed row will not prevent subsequent rows being parsed.
- codec
(implicit) the encoding.
- returns
an IO of Table[RawRow] where RawRow is a Seq[String].
- def parseInputStream[T](si: IO[InputStream], enc: String)(implicit arg0: TableParser[T]): IO[T]
Method to parse a table from an InputStream with an explicit encoding.
Method to parse a table from an InputStream with an explicit encoding.
- T
the type of the resulting table.
- si
the InputStream, wrapped in IO.
- enc
the encoding.
- returns
an IO[T]
- def parseInputStream[T](i: => InputStream)(implicit arg0: TableParser[T], codec: Codec): IO[T]
Method to parse a table from an InputStream with an implicit encoding.
Method to parse a table from an InputStream with an implicit encoding.
- T
the type of the resulting table.
- i
the InputStream (call-by-name).
- codec
(implicit) the encoding.
- returns
an IO[T]
- def parseRaw(ws: Iterable[String], predicate: (Try[RawRow]) => Boolean = includeAll, maybeFixedHeader: Option[Header] = None, forgiving: Boolean = true, multiline: Boolean = true): IO[RawTable]
Method to parse a table of raw rows from an Iterable of String.
Method to parse a table of raw rows from an Iterable of String.
- ws
the Strings.
- returns
an IO of Table of RawRow
- def parseResource[T](u: => URL, enc: String)(implicit arg0: TableParser[T]): IO[T]
Method to parse a table from a URL with an explicit encoding.
Method to parse a table from a URL with an explicit encoding.
NOTE: the logic here is different from that of parseResource(u:=>URL)(implicit codec: Codec) above.
- T
the type of the resulting table.
- u
the URL.
- enc
the encoding.
- returns
an IO[T]
- def parseResource[T](u: => URL)(implicit arg0: TableParser[T], codec: Codec): IO[T]
Method to parse a table from a URL.
Method to parse a table from a URL.
- T
the type of the resulting table.
- u
the URI.
- returns
an IO[T]
- def parseResource[T](w: String, clazz: Class[_] = getClass)(implicit arg0: TableParser[T], codec: Codec): IO[T]
Method to parse a table from an File.
Method to parse a table from an File.
- T
the type of the resulting table.
- w
the resource name.
- clazz
the class for which the resource should be sought (should default to the calling class but doesn't).
- codec
(implicit) the encoding.
- returns
an IO[T]
- def parseResourceRaw(s: String, predicate: (Try[RawRow]) => Boolean = includeAll, maybeFixedHeader: Option[Header] = None, forgiving: Boolean = true, clazz: Class[_] = getClass)(implicit codec: Codec): IO[Table[RawRow]]
Method to parse a table from a resource as a table of Seq[String].
Method to parse a table from a resource as a table of Seq[String].
- s
the resource name.
- maybeFixedHeader
an optional fixed header. If None (the default), we expect to find the header defined in the first line of the file.
- forgiving
forcing (defaults to true). If true (the default) then an individual malformed row will not prevent subsequent rows being parsed.
- clazz
the class for which the resource should be sought (defaults to the calling class).
- codec
(implicit) the encoding.
- returns
an IO of Table[RawRow] where RawRow is a Seq[String].
- def parseSource[T](x: => Source)(implicit arg0: TableParser[T]): IO[T]
Method to parse a table from a Source.
Method to parse a table from a Source.
NOTE: the caller is responsible for closing the given Source.
- T
the type of the resulting table.
- x
the Source.
- returns
an IO[T]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toCSV[T](t: Table[T])(implicit arg0: CsvRenderer[T], arg1: CsvGenerator[T], renderer: CsvRenderer[Row], generator: CsvGenerator[Row], csvAttributes: CsvAttributes): IO[String]
Method to render this Table[T] as a CSV String with (maybe) header.
Method to render this Table[T] as a CSV String with (maybe) header.
- renderer
implicit value of CsvRenderer[Row].
- generator
implicit value of CsvProductGenerator[Row].
- csvAttributes
implicit value of CsvAttributes.
- returns
a String.
- def toCSVRow(t: Table[Row])(implicit csvAttributes: CsvAttributes, renderer: CsvRenderer[Row]): IO[String]
Method to render the given Table[Row] as a CSV String with header.
Method to render the given Table[Row] as a CSV String with header.
- t
the Table[Row] to be rendered.
- csvAttributes
implicit value of CsvAttributes.
- returns
an Iterable[String]
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def writeCSVFileIO(table: Table[Row])(file: File)(implicit renderer: CsvRenderer[Row], generator: CsvGenerator[Row], csvAttributes: CsvAttributes): IO[FileWriter]
Method to render this Table[T] as a CSV file with (maybe) header.
Method to render this Table[T] as a CSV file with (maybe) header.
- file
instance of File where the output should be stored.
- renderer
implicit value of CsvRenderer[Row].
- generator
implicit value of CsvProductGenerator[Row].
- csvAttributes
implicit value of CsvAttributes.
- def writeCSVFileRow(t: Table[Row], file: File)(implicit csvAttributes: CsvAttributes): IO[FileWriter]
Method to render the given Table[Row] as a CSV String with header.
Method to render the given Table[Row] as a CSV String with header.
- t
the Table[Row] to be rendered.
- file
the destination File for the rendering of t.
- csvAttributes
implicit value of CsvAttributes.
- returns
an Iterable[String]
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)