On Mon, 2012-10-01 at 09:17 -0400, Gary Gregory wrote: > Hi All: > > Right now I have code that looks like this: > > final Charset myCharset = ... > final ContentType ct = ContentType.create(*HTTP.OCTET_STREAM_TYPE*, > myCharset); > > HTTP.OCTET_STREAM_TYPE is deprecated, so to avoild magic strings in the > code I can do: > > final ContentType ct = > ContentType.create(ContentType.APPLICATION_OCTET_STREAM.getMimeType(), > myCharset); > > What doing a fluent type of call instead: > > final ContentType ct = ContentType.APPLICATION_OCTET_STREAM.with(myCharset); > > ? >
Sounds good to me. +1 Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
