Atitit.协议的转换smb2http 原理

1. 协议的转换原理 stream的转换..

2. 常用协议转换的情形

android通过SMB访问局域网共享文件

作者::  ★(attilax)>>> 绰号:老哇的爪子 ( 全名::Attilax Akbar Al Rapanui 阿提拉克斯 阿克巴 阿尔 拉帕努伊 ) 汉字名:艾龙,  EMAIL:1466519819@qq.com

转载请注明来源: http://www.cnblogs.com/attilax/

3. code

package com.attilax.util;

import java.io.IOException;

import java.io.InputStream;

import java.io.OutputStream;

public class StreamUtil {

byte[] buffer = new byte[524288];

public   void convertStream(InputStream in, OutputStream out) {

// InputStream in = new FileInputStream(srcFile);

// out = new FileOutputStream(destFile);

int byteread;

byteread = read(in);

while (byteread != -1) {

if (byteread != 0) {

try {

out.write(buffer, 0, byteread);

System.out.println("---out.write.."+byteread);

//out.flush();

} catch (Exception e) {

e.printStackTrace();

throw new RuntimeException(e);

}

}

byteread = read(in);

}

try {

in.close();

} catch (IOException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

try {

out.close();

} catch (IOException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

}

private   int read(InputStream in ) {

int byteread;

try {

byteread = in.read(buffer,0,524288);

} catch (Exception e) {

e.printStackTrace();

byteread = 0;

}

return byteread;

}

}

Atitit.协议的转换smb2http 原理的更多相关文章

  1. atitit.农历的公式与原理以及农历日期运算

    atitit.农历的公式与原理以及农历日期运算 1. 农历的概述1 2. 如何在电脑程序里面计算农历??1 3. 农历的公式2 4. 获取当日农历日历3 5. 历史日期公式加查表才能得到精确日期3 6 ...

  2. Atitit.java图片图像处理attilax总结  BufferedImage extends java.awt.Image获取图像像素点image.getRGB(i, lineIndex); 图片剪辑/AtiPlatf_cms/src/com/attilax/img/imgx.javacutImage图片处理titit 判断判断一张图片是否包含另一张小图片 atitit 图片去噪算法的原理与

    Atitit.java图片图像处理attilax总结 BufferedImage extends java.awt.Image 获取图像像素点 image.getRGB(i, lineIndex); ...

  3. atitit.木马病毒webshell的原理and设计 java c# .net php.

    atitit.木马病毒webshell的原理and设计 java c# .net php. 1. 隐蔽性 编辑 WebShell后门具有隐蔽性,一般有隐藏在正常文件中并修改文件时间达到隐蔽的,还有利用 ...

  4. Atitit.jsou html转换纯文本 java c# php

    Atitit.jsou html转换纯文本 java c# php 1. 原理<p> <h> <li><div> 等lable转换为回车1 2. 调用2 ...

  5. atitit.软件与sql设计模式原理与本质 大总结attialx总结v6 qc26.docx

    atitit.软件与sql设计模式原理与本质 大总结attialx总结v6 qc26.docx 1.1. 版本历史2 2. 设计模式是什么2 2.1. 模式就是在一种场合下对某个问题的一个解决方案.& ...

  6. Atitit 在线支付系统功能设计原理与解决方案 与目录

    Atitit 在线支付系统功能设计原理与解决方案 与目录 1.1. 支付系统1 1.2. 独立的支付子体系..微服务架构..1 1.3. 参考书籍1 支付战争 [The PayPal Wars:Bat ...

  7. Atitit 图像处理 深刻理解梯度原理计算.v1 qc8

    Atitit 图像处理 深刻理解梯度原理计算.v1 qc8 1.1. 图像处理  梯度计算  基本梯度 内部梯度 外部梯度 方向梯度1 2. 图像梯度就是图像边缘吗?2 1.1. 图像处理  梯度计算 ...

  8. Atitit.木马病毒websql的原理跟个设计

    Atitit.木马病毒websql的原理跟个设计 1. Keyword Wsql { var sql="select "+p.txt+" as t,"+p.v+ ...

  9. Atitit.数据库存储引擎的原理与attilax 总结

    Atitit.数据库存储引擎的原理与attilax 总结 1. 存储引擎是什么1 2. 其它数据库系统(包括大多数商业选择)仅支持一种类型的数据存储2 3. 表的存储有三个文件:结构+数据+索引2 4 ...

随机推荐

  1. ubuntu 16.04.1 LTS 初始化

    gcc环境------------------sudo apt-get update && \sudo apt-get install build-essential software ...

  2. 5、Django实战第5天:首页和登录页面的配置

    从这天开始我们需要用到前端源码,需要的朋友可以进行小额打赏(15元),打赏二维码在博客的右侧,打赏后可以凭截图联系463951510@qq.com,博主收到邮件后会立即回复发送所有源码素材,实战过程中 ...

  3. centos7常用系统维护命令

    一.开机自启动服务列表 #开机自启动 apache服务 systemctl enable httpd.service #开机自启动iptables服务 systemctl enable iptable ...

  4. mfc afxbeginthread()

    在进行多线程程序设计的时候,我们经常用到AfxBeginThread函数来启动一条线程该函数使用起来非常的简单方便,其定义如下 CWinThread* AfxBeginThread(   AFX_TH ...

  5. 【基数排序】Divide by Zero 2017 and Codeforces Round #399 (Div. 1 + Div. 2, combined) C. Jon Snow and his Favourite Number

    发现值域很小,而且怎么异或都不会超过1023……然后可以使用类似基数排序的思想,每次扫一遍就行了. 复杂度O(k*1024). #include<cstdio> #include<c ...

  6. JQurey中getJSON方法错误回调方法

    1.使用try...catch实现 2.换$.ajax 3.JQuery 1.5+可以这样使用: $.getJSON("example.json", function() { al ...

  7. Intellij IDEA光标保持自动缩进,设置下次不放在行首

  8. SQL Server on Linux: How? Introduction: SQL Server Blog

    SQL Server Blog Official News from Microsoft’s Information Platform https://blogs.technet.microsoft. ...

  9. winform 窗体实现增删改查(CRUD)窗体基类模式

    参考博客下方:http://www.cnblogs.com/wuhuacong/archive/2010/05/31/1748579.html 对于一般常用到的编辑数据.新增数据窗体,分开了两个不同的 ...

  10. java以流的形式输出文件

    原文:http://blog.csdn.net/liutt55/article/details/78126614 public void downProcessFile(HttpServletRequ ...