1、使用FileStream读写文件文件头:using System;using System.Collections.Generic;using System.Text;using System.IO;读文件核心代码:byte[] byData = new byte[100];char[] cha...
Java数据类型:
1.原始数据类型(8种)
第一类:整型 byte short int long
第二类:浮点型 float double
第三类:逻辑型 boolean(它只有两个值可取true false)
第四类:字符型 char
2.引用数据类型(除8种)
interface class 数组 enum...
分类:
编程语言 时间:
2014-11-21 16:25:21
阅读次数:
167
知识点 值类型。 值类型是在栈中分配内存,在声明时初始化才能使用,不能为null。 值类型超出作用范围系统自动释放内存。 主要由两类组成:结构,枚举(enum),结构分为以下几类: 1、整型(Sbyte、Byte、Char、Short、Ushort、Int、Uint、Long、Ulong) ...
原文:http://hi.baidu.com/endyli/item/7bf074945de35e1f934f41fe定义string变量为str,内存流变量为ms,比特数组为bt1.字符串转比特数组(1)byte[] bt=System.Text.Encoding.Default.GetBytes...
分类:
编程语言 时间:
2014-11-21 11:58:22
阅读次数:
196
理论描述: Serial polling is a method of obtaining specific information from GPIB devices when they request service. When you conduct a serial poll, the C....
分类:
其他好文 时间:
2014-11-20 18:42:21
阅读次数:
326
1主要代码
关于 des 的导包 问题 要导 安卓本身的 64 位包 如果找com.sun.....可能会发生foundclass异常
String key;
public DES(String key)
{
this.key =key;
}
public String encrypt(String str) {
byte[] enc = null;
...
分类:
其他好文 时间:
2014-11-20 17:05:59
阅读次数:
233
1.I/O操作的目标
从数据源当中读取数据,以及将数据写入到数据目的地当中;
输出要把键盘改为屏幕
2.IO的分类方法
下面是个核心类是字节流的核心类
InputStream、OutputStream 是抽象类
3.读取文件和写入文件的方法
读取数据用read方法 int read(byte [] b, int off, int len) 第一个参数是by...
分类:
编程语言 时间:
2014-11-19 22:21:53
阅读次数:
229
在JAVA与C#通讯时由于两种不通的语言INT类型不样,比如在做Soket时做数据包头确认数据长度需要一个固定的字节数中存放一个INT类型的数据发送时会读不到相同的数据。在JAVA中 把 INT转为 byte[] 1 /** 2 * 把int32类型的数据转存到4个字节的byte数组中 3...
分类:
编程语言 时间:
2014-11-19 21:48:32
阅读次数:
160
path是图片路径。/// /// 将图片转成二进制 /// /// /// public static byte[] ImageDatabytes(string FilePath) { ...
分类:
数据库 时间:
2014-11-19 18:34:32
阅读次数:
213
string responseStr = null; string boundary = "----------------------" + DateTime.Now.Ticks.ToString("x"); byte[] boundarybytes...
分类:
Web程序 时间:
2014-11-19 18:20:15
阅读次数:
206