@Override public ByteChunk getChunk(String urn, int maxSize) {
		try {
			// TODO: Extract this out to somewhere.
			// Why do we even have this method?
			ByteBlob blob = getBlob(urn);
			if( blob == null ) return null;
			if( blob.getSize() > maxSize ) return null;
			
			byte[] dat = new byte[maxSize];
			InputStream is = blob.openInputStream();
			int z, read=0;
			while( (z = is.read(dat, read, dat.length-read)) > 0 ) read += z;
			if( is.read() != -1 ) return null;
			if( read == maxSize ) return new SimpleByteChunk(dat);
			byte[] copy = new byte[read];
			for( int i=0; i<read; ++i ) copy[i] = dat[i];
			return new SimpleByteChunk(copy);
		} catch( IOException e ) {
			return null;
		}
	}