public static void writeBytes(final OutputStream outs, final byte[] content) throws IOException {
		int currLoc = 0;
		int contentLen = content.length;
		BufferedOutputStream out = null;
		try {
			out = new BufferedOutputStream(outs, BUFFER_SIZE);
			while (currLoc < contentLen) {
				int len = (contentLen > currLoc + BUFFER_SIZE) ? BUFFER_SIZE : contentLen - currLoc;
				out.write(content, currLoc, len);
				currLoc += len;
			}
		} catch (IOException e) {
			throw e;
		} catch (Exception e) {
			throw new IOException(e);
		} finally {
			if (null != out) {
				out.flush();
				out.close();
				out = null;
			}
		}
	}