|
|
|
Upload файла?
|
|||
|---|---|---|---|
|
#18+
Как сделать чтобы при upload'e из потока выудить только данные файла, без контентов и разделителей -----------------------------7d535b38b028c Content-Disposition: form-data; name="file1"; filename="C:\2.txt" Content-Type: application/octet-stream содержимое файла... -----------------------------7d535b38b028c-- Закчиваю таким образом ServletInputStream sis= request.getInputStream(); byte[] buffer=new byte[4096]; int len; BufferedOutputStream bos= new BufferedOutputStream(new FileOutputStream("c:\\file1.dat")); while((len=sis.read(buffer))>0) { bos.write(buffer,0,len); } bos.close(); ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 14.07.2005, 10:19 |
|
||
|
Upload файла?
|
|||
|---|---|---|---|
|
#18+
можно почитать спецификацию протокола http и написать свой парсер, а можно готовую библиотеку использовать - http://jakarta.apache.org/commons/fileupload/ ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 14.07.2005, 11:31 |
|
||
|
|

start [/forum/topic.php?fid=59&msg=33165131&tid=2151971]: |
0ms |
get settings: |
7ms |
get forum list: |
8ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
53ms |
get topic data: |
6ms |
get forum data: |
1ms |
get page messages: |
25ms |
get tp. blocked users: |
1ms |
| others: | 194ms |
| total: | 303ms |

| 0 / 0 |
