Showing posts with label insert. Show all posts
Showing posts with label insert. Show all posts
Sunday, August 19, 2012
Scala-IO Core: Seekable
At the same level of abstraction as Input and Output is the fine trait called Seekable. As the name implies it provides random access style methods for interacting with a resource. The example that comes immediately to mind is a random access file.
The design of Seekable largely mimics the scala.collection.Seq patch and insert methods. Not much more to say beyond getting into some examples:
IMPORTANT: Each time truncate() or patch or insert is called a new connection to the file is opened and closed. The Processor API is to be used to perform multiple operations within one connection.
The design of Seekable largely mimics the scala.collection.Seq patch and insert methods. Not much more to say beyond getting into some examples:
IMPORTANT: Each time truncate() or patch or insert is called a new connection to the file is opened and closed. The Processor API is to be used to perform multiple operations within one connection.
Labels:
append,
daily-scala,
insert,
patch,
Scala,
scala-io,
scala-io core,
seekable,
truncate
Subscribe to:
Comments (Atom)