package io
- Alphabetic
- By Inheritance
- io
- LowPriorityIOImplicits
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- trait ByteFormat[T] extends ToBytes[T] with FromBytes[T]
- case class CloseableIterator[T](iter: Iterator[T])(closeMe: => Unit) extends Iterator[T] with AutoCloseable with Product with Serializable
An iterator which will invoke the given 'closeMe' thunk when it is exhausted It also implements 'AutoClosable' should it need to be closed early
- trait FromBytes[T] extends AnyRef
Typeclass to serialize a type from a byte array
- final class Lazy[T] extends AutoCloseable with LazyLogging
A wrapper for lazy values which can be queried whether they are created.
A wrapper for lazy values which can be queried whether they are created.
This was created primarily for being able to close/clean up things which may or may not have been created.
e.g. instead of this:
lazy val someResource = ... // we may not have had a 'someResource' yet, so trying to close() our object // would instantiate and then 'close' the resource def close() = someResource.close()
we'd have this:
private val someResource_ = Lazy { ... } def someResource = someResource_.value def close() = someResource_.close() // or perhaps someResource_.foreach(_.destroy)
- trait LowPriorityIOImplicits extends AnyRef
Contains some 'pimped' types (adding <string>.asPath), and RichPath
- implicit class RichPathString extends AnyRef
exposes 'toPath' on strings, for e.g.
exposes 'toPath' on strings, for e.g.
"/var/tmp/foo.txt".asPath.text = "hello world"
- returns
a pimped string
- Definition Classes
- LowPriorityIOImplicits
- final class RichPath extends AnyRef
- trait ToBytes[T] extends AnyRef
Typeclass to serialize a type to bytes
Typeclass to serialize a type to bytes
- T
the value to convert
Value Members
- implicit def asRichPath(path: Path): RichPath
- Definition Classes
- LowPriorityIOImplicits
- implicit def strAsToBytes: ToBytes[Array[Byte]]
- Definition Classes
- LowPriorityIOImplicits
- object AlphaCounter
Provides a means to encode a long into a shorter string of characters (alphanumeric by default, so effectively base 62 instead of base 10 (10 + 26 + 26)
- object FromBytes
- object Hex
- object Lazy
- object LowPriorityIOImplicits
- object MD5
- object RichPath
- object ToBytes extends LowPriorityIOImplicits