Skip to content

Instantly share code, notes, and snippets.

View ice09's full-sized avatar

Alexander C. ice09

View GitHub Profile
/**
* Base contract that all upgradeable contracts should use.
*
* Contracts implementing this interface are all called using delegatecall from
* a dispatcher. As a result, the _sizes and _dest variables are shared with the
* dispatcher contract, which allows the called contract to update these at will.
*
* _sizes is a map of function signatures to return value sizes. Due to EVM
* limitations, these need to be populated by the target contract, so the
* dispatcher knows how many bytes of data to return from called functions.
@calo81
calo81 / LoggerFilter
Created March 18, 2012 12:48
Filter for reading and logging HttpServletRequest body, and resetting the input stream
package com.paddypower.financials.market.management.rest.logging;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import javax.servlet.Filter;
import javax.servlet.FilterChain;