@Override
	public byte[] read(FileLocation location) throws InvalidPathException {
		try {
			URL url = new URL(location.getProtocol() + ":" + location.getFile());
			try (InputStream in = url.openStream()) {
				try(ByteArrayOutputStream buffer = new ByteArrayOutputStream()) {
					int nRead;
					byte[] data = new byte[1024];
					while ((nRead = in.read(data, 0, data.length)) != -1) {
						buffer.write(data, 0, nRead);
					}

					buffer.flush();
					return buffer.toByteArray();
				}
			}
		} catch (MalformedURLException e) {
			throw new InvalidPathException(e);
		} catch (IOException e) {
			throw new InvalidPathException(e);
		}
	}
@author <a href="mailto:wangyuxuan@dangdang.com">Yuxuan Wang</a>
config-toolkit/src/main/java/com/dangdang/config/service/file/protocol/HttpProtocol.java