After reading a picture than out a picture
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//设置响应文本类型
response.setContentType("image/jpeg");
//获取输出流
InputStream in=this.getClass().getClassLoader().getResourceAsStream("girl.jpg");
//在读写操作前先获得数据流的总长
int len= 0;
while (len==0) {
len=in.available();
}
byte[] buffer=new byte[len];
in.read(buffer);
}
After reading a picture than out a picture.
After reading a picture than out a picture的更多相关文章
- C# Argument 'picture' must be a picture that can be used as an Icon
Scenario: 创建了一个WinForm的小程序,希望将它显示在任务栏,所以在工具栏中的“公共控件”里,拖入NotifyIcon控件—notifyIcon1,这个是程序运行任务栏右侧通知区域图标显 ...
- A Complete Guide to the <Picture> Element
If you’ve ever struggled building responsive websites, this post is for you. It’s part of a series o ...
- VB6-图像分割利器 Microsoft Picture Clip控件
在医院做图像处理时碰到双面扫描仪,需要将扫描到的2张图像分割为一张并打印.在分割图像的过程中总是不得法,后来虽然有CBM666的指导,但给的方法也还是不太方便.无意中在翻一本vb书的时候看到了一个使用 ...
- error C2011: “Picture”:“struct”类型重定义
今天引用外来库时出现问题,也许是版本问题. 错误如下: .....\oursun\cincludes\quickdraw.h(309): error C2011: “Picture”:“struct” ...
- 如何使用 HTML5 的picture元素处理响应式图片
来自: http://www.w3cplus.com/html5/quick-tip-how-to-use-html5-picture-for-responsive-images.html 图片在响应 ...
- HTML5<picture>元素
HTML5<picture>元素可以设置多张图片 <!DOCTYPE html><html><head><meta http-equiv=&quo ...
- 转:Busy Developers' Guide to HSSF and XSSF Features
Busy Developers' Guide to Features Want to use HSSF and XSSF read and write spreadsheets in a hurry? ...
- 《Play for Java》学习笔记(六)文件上传file upload
一. Play中标准方法 使用表单form和multipart/form-data的content-type类型. 1.Form @form(action = routes.Application.u ...
- 【转】LaTeX 符号命令大全
函数.符号及特殊字符 声调 语法 效果 语法 效果 语法 效果 \bar{x} \acute{\eta} \check{\alpha} \grave{\eta} \breve{a} \ddot{y} ...
随机推荐
- python学习读取配置文件
配置文件作为一种可读性很好的格式,非常适用于存储程序中的配置数据. 在每个配置文件中,配置数据会被分组(比如“config”和 “cmd”). 每个分组在其中指定对应的各个变量值.如下: # 定义co ...
- 教你如何在linux下查看服务是否已经启动或者关闭
1. # ps aux | grep 服务名称(ps 的参数是可以颠倒使用没问题) 2. # netstat -tunple | grep 服务端口 3.bind() 80 in using 代表的含 ...
- CentOS安装mysql并配置远程访问
最近上班挺无聊,每天就是不停的重启重启重启,然后抓log.于是有事儿没事儿的看卡闲书,搞搞其他事情. 但是,公司笔记本装太多乱其八糟的东西也还是不太好. 于是,想到了我那个当VPN server的VP ...
- redhat6.4 elasticsearch1.7.3安装配置
利用elasticsearch管理集群索引, 今天刚好需要重新调整elasticsearch的最大内存, 所以自己安装了练手 附件: elasticsearch 附件:elasticsearch-he ...
- SQLSERVER中order by ,group by ,having where 的先后顺序
SELECT [Name] FROM [LinqToSql].[dbo].[Student] where name='***' group by name having (name='* ...
- MySQL命令行导出、导入数据库,备份数据库表
MySQL导出数据库/数据表 1.首先,将你MySQL安装目录,例如C:\Program Files\MySQL\MySQL Server 5.7\bin添加到你的系统环境变量PATH中: 2.导出数 ...
- POJ1144 Network(割点)题解
Description A Telephone Line Company (TLC) is establishing a new telephone cable network. They are c ...
- Large Division(大数)题解
Given two integers, a and b, you should check whether a is divisible by b or not. We know that an in ...
- spring boot 启动后执行初始化方法
http://blog.csdn.net/catoop/article/details/50501710 1.创建实现接口 CommandLineRunner 的类 package org.sprin ...
- [Redis] - redis实战
Microsoft Windows [版本 10.0.17134.472] (c) Microsoft Corporation.保留所有权利. C:\Users\SeeClanUkyo>f: F ...