@Test
	public void testGetMstxAdsImageByGpid() {
		int gpid = 0;
		Blob blob = MstxDao.getMstxAdsImageByGpid(gpid);

		InputStream is = null;

		try {
			is = new BufferedInputStream(blob.getBinaryStream());

			byte[] buf = new byte[1024];
			int len = 0;

			String PATH = "D:\\image\\face\\";
			String fileName = PATH + "output_Header.jpg";
			File file = new File(fileName);
			FileOutputStream outs = new FileOutputStream(file);
			BufferedOutputStream output = new BufferedOutputStream(outs);
			System.out.println("OutputStream is ini");
			while ((len = is.read(buf, 0, 1024)) != -1) {
				System.out.println("output...");
				output.write(buf, 0, len);
			}
			if (is != null) {
				is.close();
			}
			if (output != null) {
				output.close();
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}