Skip to content

Instantly share code, notes, and snippets.

@brentworden
brentworden / JacksonTest.java
Last active December 21, 2015 23:59
Jackson deserialization example for inner classes. The example is in the form of a JUnit test.
package jacksontest;
import java.io.IOException;
import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.map.JsonMappingException;
import org.codehaus.jackson.map.ObjectMapper;
import org.junit.Assert;
import org.junit.Test;
@brentworden
brentworden / DataReaderExtensions.cs
Last active January 21, 2016 08:34
System.Data.IDataReader extension method to fully read the bytes from a large binary column
using System.Data;
using System.IO;
namespace Extensions.Data {
public static class DataReaderExtensions {
/*
* Extension method on IDataReader that reads the entire contents of a large binary column using a single method call.
* Sample usage: