An ImageInputStream implementation that reads from an Array[Byte]
An ImageOutputStream implementation that writes to a Array[Byte]
A Simple InputStream wrapper around a ByteBuffer
A Simple OutputStream wrapper around a ByteBuffer
EXPERIMENTAL - A Scala mutable map that wraps a java ConcurrentHashMap and allows null values
EXPERIMENTAL - A Scala mutable Set based on ConcurrentHashMap
A Simple Crypto Class
A Simple Crypto Class
NOTE: Use at your own risk. We make no claim that any of this Crypto code is correct.
A Dummy Resource that does nothing
For Resource.flatMap
Like java.io.ByteArrayOutputStream but exposes the internal Array
Simple Wrapper around an IPv4 Address
EXPERIMENTAL - A Java Set based on ConcurrentHashMap
This can be extended for basic logging functionality
For Resource.map
Compatible with the Rails MessageEncryptor using 'aes-256-cbc' and MessageVerifier using 'sha1' when working with *String* values.
Compatible with the Rails MessageEncryptor using 'aes-256-cbc' and MessageVerifier using 'sha1' when working with *String* values.
Also compatible with the custom MessageCrypto which marshalls values as JSON instead of using the ruby Marshal.dump and Marshal.load. Use json=true to dump using JSON.
MessageEncryptor uses Marshal.dump and Marshal.load on whatever values you are trying to encrypt/sign. A subset of Marshal.dump and Marshal.load have been implemented to support String values.
NOTE: This is a legacy class that was created when we switched from Rails to Scala. It is still used in a few places but probably needs to be refactored to remove the old Ruby marshalling stuff.
A Resource that can be used multiple times (e.g.
A Resource that can be used multiple times (e.g. opening an InputStream or Reader for a File)
scala.math.Ordering only goes up to Tuple9
Represents immutable query parameters from a query string (e.g.
Represents immutable query parameters from a query string (e.g. "?foo=bar&asd=qwe").
This class distinguishes between 3 different types of values for a key:
An Automatically Managed Resource that can either be used once (e.g.
An Automatically Managed Resource that can either be used once (e.g. reading an input stream) or multiple times (e.g. reading a file).
The purpose of Resource is two-fold: 1 - To automatically handle closing a resource after it is done being used. 2 - To abstract the fact that some resources can be read multiple times while other resources are one-time use.
This is a replacement for the deprecated scala.collection.SeqProxy.
This is a replacement for the deprecated scala.collection.SeqProxy.
This doesn't implement Seq[A] like the original SeqProxy but instead just provides an implicit conversion from this trait into a Seq[A] which then gives you all the Seq functionality
This is here so that LazySeq can be split out into it's own project.
This is here so that LazySeq can be split out into it's own project.
Some implementations are still in our internal Util package for now until we get a chance to refactor and possible merge with our fm-serializer project.
A Resource that can only be used once (e.g.
A Resource that can only be used once (e.g. reading an InputStream)
A type alias for java.net.URI
A type alias for java.net.URL
Wraps an InputStream and makes the close() method do nothing
Wraps an OutputStream and makes the close() method do nothing
An object pool based on a WeakHashMap (using weak key AND weak values) that can be used to return canonical versions of objects.
An object pool based on a WeakHashMap (using weak key AND weak values) that can be used to return canonical versions of objects. Once all references to the object go away the WeakHashMap entry will be GC'd.
This is similar to how String.intern() works (although probably not as efficient)
This contains utility methods for scanning Classes or Files on the classpath.
This contains utility methods for scanning Classes or Files on the classpath.
Originally we used the classpath scanning functionality in the Spring Framework and then later switched to the Reflections library (https://code.google.com/p/reflections/) to avoid the dependency on Spring. At some point we ran into issues with the Reflections library not properly detecting classes so I ended up writing this as a replacement.
NOTE: Use at your own risk.
NOTE: Use at your own risk. We make no claim that any of this Crypto code is correct.
Simple Wrapper around org.apache.commons.codec.digest.DigestUtils
Wrappers around org.apache.commons.codec.binary.Hex
Collection of IO Utilities.
Collection of IO Utilities. Some implemented via Apache Commons IO
Helpers for parsing and working with IPv4 addresses
This is the same as scala.collection.JavaConverters with a few additional methods.
This is the same as scala.collection.JavaConverters with a few additional methods.
Specifically you can now call .asScalaNullToEmpty to have null java collections converted to an empty collection to avoid NullPointerExceptions
This has SLF4J/Logback Helpers that depend on SLF4j/Logback
This has SLF4J/Logback Helpers that depend on SLF4j/Logback
TODO: Clean this up!!
Implicits that go along with the Serializer trait
By importing TypeWiseBalancedEquality._
you get type-safe and type-wise balanced equality:
By importing TypeWiseBalancedEquality._
you get type-safe and type-wise balanced equality:
import name.heikoseeberger.demoequality.TypeWiseBalancedEquality._ 123 === 666 // false "a" === "a" // true 123 === "a" // won't compile!
This equality is balanced with respect to subtyping,
hence ===
works (compiles) for any two arguments on the left and right,
whose types are in a subtype relationship (which includes type equality):
Seq(1, 2, 3) === List(1, 2, 3) List(1, 2, 3) === Seq(1, 2, 3)
Yet it doesn't work (compile) for two arguments on the left and right, whose types are in an implicit conversion relationship:
1L === 1 // won't compile! 1 === 1L // won't compile!
Simple wrappers for the java.net.URI constructors
Simple wrappers for the java.net.URL constructors
An empty resource
By importing ViewWiseBalancedEquality._
you get type-safe and view-wise balanced equality:
By importing ViewWiseBalancedEquality._
you get type-safe and view-wise balanced equality:
import name.heikoseeberger.demoequality.ViewWiseBalancedEquality._ 123 === 666 // false "a" === "a" // true 123 === "a" // won't compile!
This equality is balanced with respect to implicit conversions,
hence ===
works (compiles) for any two arguments on the left and right,
whose types are in a implicit conversion relationship (which includes a subtype relationship),
i.e. one can be viewed as the other:
Seq(1, 2, 3) === List(1, 2, 3) List(1, 2, 3) === Seq(1, 2, 3) 1L === 1 1 === 1L