`
crazier9527
  • 浏览: 996187 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Java 与 C 底层数据类型转换

    博客分类:
  • Java
阅读更多

前段时间一直忙着做J2EE服务器与C++客户端的项目。终于,项目告一段落,有一些收获在这里与大家分享。

Java代码 复制代码
  1. import java.io.ByteArrayInputStream;   
  2. import java.io.ByteArrayOutputStream;   
  3. import java.io.DataInputStream;   
  4. import java.io.DataOutputStream;   
  5. import java.io.IOException;   
  6.   
  7. /**  
  8.  * 仅仅适用于 Java 与 C++ 通讯中,网络流解析与生成使用  
  9.  *  
  10.  * 高低位互换(Big-Endian 大头在前 & Little-Endian 小头在前)。  
  11.  * 举例而言,有一个4字节的数据0x01020304,要存储在内存中或文件中编号0˜3字节的位置,两种字节序的排列方式分别如下:  
  12.  *   
  13.  * Big Endian  
  14.  *    
  15.  * 低地址                           高地址  
  16.  * ---------------------------------------------------->  
  17.  * 地址编号  
  18.  * |     0      |      1     |     2       |      3    |  
  19.  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  
  20.  * |     01     |      02    |     03      |     04    |  
  21.  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  
  22.  *   
  23.  * Little Endian  
  24.  *   
  25.  * 低地址                           高地址  
  26.  * ---------------------------------------------------->  
  27.  * 地址编号  
  28.  * |     0      |      1     |     2       |      3    |  
  29.  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  
  30.  * |     04     |      03    |     02      |     01    |  
  31.  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  
  32.  *   
  33.  * Java则统一使用big模式  
  34.  * c中的unsigned short  对应着java中的char两个字节,无符号  
  35.  * c的无符号int,short,byte字节数组,相应转换成java的long,char,short  
  36.  *  
  37.  * @author Snowolf  
  38.  * @version 1.0  
  39.  * @since 1.0  
  40.  */  
  41. public abstract class CIOUtil {   
  42.     public static final String CHARSET = "UTF-8";   
  43.   
  44.     /**  
  45.      * 从输入流中读布尔   
  46.      *   
  47.      * @param is  
  48.      * @return  
  49.      * @throws IOException  
  50.      */  
  51.     public static boolean readBoolean(DataInputStream is) throws IOException {   
  52.         return is.readBoolean();   
  53.     }   
  54.   
  55.     /**  
  56.      * 从流中读定长度字节数组  
  57.      *   
  58.      * @param is  
  59.      * @param s  
  60.      * @return  
  61.      * @throws IOException  
  62.      */  
  63.     public static byte[] readBytes(DataInputStream is, int i)   
  64.             throws IOException {   
  65.         byte[] data = new byte[i];   
  66.         is.readFully(data);   
  67.   
  68.         return data;   
  69.     }   
  70.   
  71.     /**  
  72.      * 从输入流中读字符   
  73.      *   
  74.      * @param is  
  75.      * @return  
  76.      * @throws IOException  
  77.      */  
  78.     public static char readChar(DataInputStream is) throws IOException {   
  79.         return (char) readShort(is);   
  80.     }   
  81.   
  82.     /**  
  83.      * 从输入流中读双精度   
  84.      *   
  85.      * @param is  
  86.      * @return  
  87.      * @throws IOException  
  88.      */  
  89.     public static double readDouble(DataInputStream is) throws IOException {   
  90.         return Double.longBitsToDouble(readLong(is));   
  91.     }   
  92.   
  93.     /**  
  94.      * 从输入流中读单精度  
  95.      *   
  96.      * @param is  
  97.      * @return  
  98.      * @throws IOException  
  99.      */  
  100.     public static float readFloat(DataInputStream is) throws IOException {   
  101.         return Float.intBitsToFloat(readInt(is));   
  102.     }   
  103.   
  104.     /**  
  105.      * 从流中读整型  
  106.      *   
  107.      * @param is  
  108.      * @return  
  109.      * @throws IOException  
  110.      */  
  111.     public static int readInt(DataInputStream is) throws IOException {   
  112.         return Integer.reverseBytes(is.readInt());   
  113.     }   
  114.   
  115.     /**  
  116.      * 从流中读长整型  
  117.      *   
  118.      * @param is  
  119.      * @return  
  120.      * @throws IOException  
  121.      */  
  122.     public static long readLong(DataInputStream is) throws IOException {   
  123.         return Long.reverseBytes(is.readLong());   
  124.     }   
  125.   
  126.     /**  
  127.      * 从流中读短整型  
  128.      *   
  129.      * @param is  
  130.      * @return  
  131.      * @throws IOException  
  132.      */  
  133.     public static short readShort(DataInputStream is) throws IOException {   
  134.         return Short.reverseBytes(is.readShort());   
  135.     }   
  136.   
  137.     /**  
  138.      * 从输入流中读字符串 字符串 结构 为 一个指定字符串字节长度的短整型+实际字符串  
  139.      *   
  140.      * @param is  
  141.      * @return  
  142.      * @throws IOException  
  143.      */  
  144.     public static String readUTF(DataInputStream is) throws IOException {   
  145.         short s = readShort(is);   
  146.         byte[] str = new byte[s];   
  147.   
  148.         is.readFully(str);   
  149.   
  150.         return new String(str, CHARSET);   
  151.     }   
  152.   
  153.     /**  
  154.      * 向输出流中写布尔  
  155.      *   
  156.      * @param os  
  157.      * @param b  
  158.      * @throws IOException  
  159.      */  
  160.     public static void writeBoolean(DataOutputStream os, boolean b)   
  161.             throws IOException {   
  162.         os.writeBoolean(b);   
  163.     }   
  164.   
  165.     /**  
  166.      * 向输出流中写字节数组  
  167.      *   
  168.      * @param os  
  169.      * @param data  
  170.      * @throws IOException  
  171.      */  
  172.     public static void writeBytes(DataOutputStream os, byte[] data)   
  173.             throws IOException {   
  174.         os.write(data);   
  175.     }   
  176.   
  177.     /**  
  178.      * 向输出流中写字符  
  179.      *   
  180.      * @param os  
  181.      * @param b  
  182.      * @throws IOException  
  183.      */  
  184.     public static void writeChar(DataOutputStream os, char b)   
  185.             throws IOException {   
  186.         writeShort(os, (short) b);   
  187.     }   
  188.   
  189.     /**  
  190.      * 向输出流中写双精度  
  191.      *   
  192.      * @param os  
  193.      * @param d  
  194.      * @throws IOException  
  195.      */  
  196.     public static void writeDouble(DataOutputStream os, double d)   
  197.             throws IOException {   
  198.         writeLong(os, Double.doubleToLongBits(d));   
  199.     }   
  200.   
  201.     /**  
  202.      * 向输出流中写单精度  
  203.      *   
  204.      * @param os  
  205.      * @param f  
  206.      * @throws IOException  
  207.      */  
  208.     public static void writeFloat(DataOutputStream os, float f)   
  209.             throws IOException {   
  210.         writeInt(os, Float.floatToIntBits(f));   
  211.     }   
  212.   
  213.     /**  
  214.      * 向输出流中写整型  
  215.      *   
  216.      * @param os  
  217.      * @param i  
  218.      * @throws IOException  
  219.      */  
  220.     public static void writeInt(DataOutputStream os, int i) throws IOException {   
  221.         os.writeInt(Integer.reverseBytes(i));   
  222.     }   
  223.   
  224.     /**  
  225.      * 向输出流中写长整型  
  226.      *   
  227.      * @param os  
  228.      * @param l  
  229.      * @throws IOException  
  230.      */  
  231.     public static void writeLong(DataOutputStream os, long l)   
  232.             throws IOException {   
  233.         os.writeLong(Long.reverseBytes(l));   
  234.     }   
  235.   
  236.     /**  
  237.      * 向输出流中写短整型  
  238.      *   
  239.      * @param os  
  240.      * @param s  
  241.      * @throws IOException  
  242.      */  
  243.     public static void writeShort(DataOutputStream os, short s)   
  244.             throws IOException {   
  245.         os.writeShort(Short.reverseBytes(s));   
  246.     }   
  247.   
  248.     /**  
  249.      * 向输出流中写字符串 字符串 结构 为 一个指定字符串字节长度的短整型+实际字符串  
  250.      *   
  251.      * @param os  
  252.      * @param str  
  253.      * @throws IOException  
  254.      */  
  255.     public static void writeUTF(DataOutputStream os, String str)   
  256.             throws IOException {   
  257.         byte[] data = str.getBytes(CHARSET);   
  258.         writeShort(os, (short) data.length);   
  259.         os.write(data);   
  260.     }   
  261.   
  262. }  
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;

/**
 * 仅仅适用于 Java 与 C++ 通讯中,网络流解析与生成使用
 *
 * 高低位互换(Big-Endian 大头在前 & Little-Endian 小头在前)。
 * 举例而言,有一个4字节的数据0x01020304,要存储在内存中或文件中编号0˜3字节的位置,两种字节序的排列方式分别如下:
 * 
 * Big Endian
 *  
 * 低地址                           高地址
 * ---------------------------------------------------->
 * 地址编号
 * |     0      |      1     |     2       |      3    |
 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 * |     01     |      02    |     03      |     04    |
 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 * 
 * Little Endian
 * 
 * 低地址                           高地址
 * ---------------------------------------------------->
 * 地址编号
 * |     0      |      1     |     2       |      3    |
 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 * |     04     |      03    |     02      |     01    |
 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 * 
 * Java则统一使用big模式
 * c中的unsigned short  对应着java中的char两个字节,无符号
 * c的无符号int,short,byte字节数组,相应转换成java的long,char,short
 *
 * @author Snowolf
 * @version 1.0
 * @since 1.0
 */
public abstract class CIOUtil {
	public static final String CHARSET = "UTF-8";

	/**
	 * 从输入流中读布尔 
	 * 
	 * @param is
	 * @return
	 * @throws IOException
	 */
	public static boolean readBoolean(DataInputStream is) throws IOException {
		return is.readBoolean();
	}

	/**
	 * 从流中读定长度字节数组
	 * 
	 * @param is
	 * @param s
	 * @return
	 * @throws IOException
	 */
	public static byte[] readBytes(DataInputStream is, int i)
			throws IOException {
		byte[] data = new byte[i];
		is.readFully(data);

		return data;
	}

	/**
	 * 从输入流中读字符 
	 * 
	 * @param is
	 * @return
	 * @throws IOException
	 */
	public static char readChar(DataInputStream is) throws IOException {
		return (char) readShort(is);
	}

	/**
	 * 从输入流中读双精度 
	 * 
	 * @param is
	 * @return
	 * @throws IOException
	 */
	public static double readDouble(DataInputStream is) throws IOException {
		return Double.longBitsToDouble(readLong(is));
	}

	/**
	 * 从输入流中读单精度
	 * 
	 * @param is
	 * @return
	 * @throws IOException
	 */
	public static float readFloat(DataInputStream is) throws IOException {
		return Float.intBitsToFloat(readInt(is));
	}

	/**
	 * 从流中读整型
	 * 
	 * @param is
	 * @return
	 * @throws IOException
	 */
	public static int readInt(DataInputStream is) throws IOException {
		return Integer.reverseBytes(is.readInt());
	}

	/**
	 * 从流中读长整型
	 * 
	 * @param is
	 * @return
	 * @throws IOException
	 */
	public static long readLong(DataInputStream is) throws IOException {
		return Long.reverseBytes(is.readLong());
	}

	/**
	 * 从流中读短整型
	 * 
	 * @param is
	 * @return
	 * @throws IOException
	 */
	public static short readShort(DataInputStream is) throws IOException {
		return Short.reverseBytes(is.readShort());
	}

	/**
	 * 从输入流中读字符串 字符串 结构 为 一个指定字符串字节长度的短整型+实际字符串
	 * 
	 * @param is
	 * @return
	 * @throws IOException
	 */
	public static String readUTF(DataInputStream is) throws IOException {
		short s = readShort(is);
		byte[] str = new byte[s];

		is.readFully(str);

		return new String(str, CHARSET);
	}

	/**
	 * 向输出流中写布尔
	 * 
	 * @param os
	 * @param b
	 * @throws IOException
	 */
	public static void writeBoolean(DataOutputStream os, boolean b)
			throws IOException {
		os.writeBoolean(b);
	}

	/**
	 * 向输出流中写字节数组
	 * 
	 * @param os
	 * @param data
	 * @throws IOException
	 */
	public static void writeBytes(DataOutputStream os, byte[] data)
			throws IOException {
		os.write(data);
	}

	/**
	 * 向输出流中写字符
	 * 
	 * @param os
	 * @param b
	 * @throws IOException
	 */
	public static void writeChar(DataOutputStream os, char b)
			throws IOException {
		writeShort(os, (short) b);
	}

	/**
	 * 向输出流中写双精度
	 * 
	 * @param os
	 * @param d
	 * @throws IOException
	 */
	public static void writeDouble(DataOutputStream os, double d)
			throws IOException {
		writeLong(os, Double.doubleToLongBits(d));
	}

	/**
	 * 向输出流中写单精度
	 * 
	 * @param os
	 * @param f
	 * @throws IOException
	 */
	public static void writeFloat(DataOutputStream os, float f)
			throws IOException {
		writeInt(os, Float.floatToIntBits(f));
	}

	/**
	 * 向输出流中写整型
	 * 
	 * @param os
	 * @param i
	 * @throws IOException
	 */
	public static void writeInt(DataOutputStream os, int i) throws IOException {
		os.writeInt(Integer.reverseBytes(i));
	}

	/**
	 * 向输出流中写长整型
	 * 
	 * @param os
	 * @param l
	 * @throws IOException
	 */
	public static void writeLong(DataOutputStream os, long l)
			throws IOException {
		os.writeLong(Long.reverseBytes(l));
	}

	/**
	 * 向输出流中写短整型
	 * 
	 * @param os
	 * @param s
	 * @throws IOException
	 */
	public static void writeShort(DataOutputStream os, short s)
			throws IOException {
		os.writeShort(Short.reverseBytes(s));
	}

	/**
	 * 向输出流中写字符串 字符串 结构 为 一个指定字符串字节长度的短整型+实际字符串
	 * 
	 * @param os
	 * @param str
	 * @throws IOException
	 */
	public static void writeUTF(DataOutputStream os, String str)
			throws IOException {
		byte[] data = str.getBytes(CHARSET);
		writeShort(os, (short) data.length);
		os.write(data);
	}

}


再写个测试类

Java代码 复制代码
  1. import java.io.ByteArrayInputStream;   
  2. import java.io.ByteArrayOutputStream;   
  3. import java.io.DataInputStream;   
  4. import java.io.DataOutputStream;   
  5. import java.io.IOException;   
  6.   
  7. import org.junit.Test;   
  8. import static org.junit.Assert.*;   
  9.   
  10. /**  
  11.  *   
  12.  * @author Snowolf  
  13.  * @version 1.0  
  14.  * @since 1.0  
  15.  */  
  16. public class CIOUtilTest {   
  17.     /**  
  18.      * 测试布尔值  
  19.      *   
  20.      * @throws IOException  
  21.      */  
  22.     @Test  
  23.     public final void testBoolean() throws IOException {   
  24.         boolean input = true;   
  25.         ByteArrayOutputStream baos = new ByteArrayOutputStream();   
  26.         DataOutputStream os = new DataOutputStream(baos);   
  27.   
  28.         CIOUtil.writeBoolean(os, input);   
  29.   
  30.         byte[] b = baos.toByteArray();   
  31.         baos.flush();   
  32.         baos.close();   
  33.   
  34.         ByteArrayInputStream bais = new ByteArrayInputStream(b);   
  35.         DataInputStream is = new DataInputStream(bais);   
  36.   
  37.         boolean output = CIOUtil.readBoolean(is);   
  38.   
  39.         bais.close();   
  40.   
  41.         assertEquals(input, output);   
  42.     }   
  43.   
  44.     /**  
  45.      * 测试字节数组  
  46.      *   
  47.      * @throws IOException  
  48.      */  
  49.     @Test  
  50.     public final void testBytes() throws IOException {   
  51.         byte[] input = "中文".getBytes("UTF-8");   
  52.         ByteArrayOutputStream baos = new ByteArrayOutputStream();   
  53.         DataOutputStream os = new DataOutputStream(baos);   
  54.   
  55.         CIOUtil.writeBytes(os, input);   
  56.   
  57.         byte[] b = baos.toByteArray();   
  58.         baos.flush();   
  59.         baos.close();   
  60.   
  61.         ByteArrayInputStream bais = new ByteArrayInputStream(b);   
  62.         DataInputStream is = new DataInputStream(bais);   
  63.   
  64.         byte[] output = CIOUtil.readBytes(is, 6);   
  65.   
  66.         bais.close();   
  67.   
  68.         assertArrayEquals(input, output);   
  69.     }   
  70.   
  71.     /**  
  72.      * 测试字符  
  73.      *   
  74.      * @throws IOException  
  75.      */  
  76.     @Test  
  77.     public final void testChar() throws IOException {   
  78.         char input = '中';   
  79.         ByteArrayOutputStream baos = new ByteArrayOutputStream();   
  80.         DataOutputStream os = new DataOutputStream(baos);   
  81.   
  82.         CIOUtil.writeChar(os, input);   
  83.   
  84.         byte[] b = baos.toByteArray();   
  85.         baos.flush();   
  86.         baos.close();   
  87.   
  88.         ByteArrayInputStream bais = new ByteArrayInputStream(b);   
  89.         DataInputStream is = new DataInputStream(bais);   
  90.   
  91.         char output = CIOUtil.readChar(is);   
  92.   
  93.         bais.close();   
  94.   
  95.         assertEquals(input, output);   
  96.     }   
  97.   
  98.     /**  
  99.      * 测试双精度  
  100.      *   
  101.      * @throws IOException  
  102.      */  
  103.     @Test  
  104.     public final void testDouble() throws IOException {   
  105.         double input = 1.23456789d;   
  106.         ByteArrayOutputStream baos = new ByteArrayOutputStream();   
  107.         DataOutputStream os = new DataOutputStream(baos);   
  108.   
  109.         CIOUtil.writeDouble(os, input);   
  110.   
  111.         byte[] b = baos.toByteArray();   
  112.         baos.flush();   
  113.         baos.close();   
  114.   
  115.         ByteArrayInputStream bais = new ByteArrayInputStream(b);   
  116.         DataInputStream is = new DataInputStream(bais);   
  117.   
  118.         double output = CIOUtil.readDouble(is);   
  119.   
  120.         bais.close();   
  121.   
  122.         assertEquals(input, output, 9);   
  123.     }   
  124.   
  125.     /**  
  126.      * 测试单精度  
  127.      *   
  128.      * @throws IOException  
  129.      */  
  130.     @Test  
  131.     public final void testFloat() throws IOException {   
  132.         float input = 1.23456789f;   
  133.         ByteArrayOutputStream baos = new ByteArrayOutputStream();   
  134.         DataOutputStream os = new DataOutputStream(baos);   
  135.   
  136.         CIOUtil.writeFloat(os, input);   
  137.   
  138.         byte[] b = baos.toByteArray();   
  139.         baos.flush();   
  140.         baos.close();   
  141.   
  142.         ByteArrayInputStream bais = new ByteArrayInputStream(b);   
  143.         DataInputStream is = new DataInputStream(bais);   
  144.   
  145.         float output = CIOUtil.readFloat(is);   
  146.   
  147.         bais.close();   
  148.   
  149.         assertEquals(input, output, 9);   
  150.     }   
  151.   
  152.     /**  
  153.      * 测试整型  
  154.      *   
  155.      * @throws IOException  
  156.      */  
  157.     @Test  
  158.     public final void testInt() throws IOException {   
  159.         int input = 1;   
  160.         ByteArrayOutputStream baos = new ByteArrayOutputStream();   
  161.         DataOutputStream os = new DataOutputStream(baos);   
  162.   
  163.         CIOUtil.writeInt(os, input);   
  164.   
  165.         byte[] b = baos.toByteArray();   
  166.         baos.flush();   
  167.         baos.close();   
  168.   
  169.         ByteArrayInputStream bais = new ByteArrayInputStream(b);   
  170.         DataInputStream is = new DataInputStream(bais);   
  171.   
  172.         int output = CIOUtil.readInt(is);   
  173.   
  174.         bais.close();   
  175.   
  176.         assertEquals(input, output);   
  177.     }   
  178.   
  179.     /**  
  180.      * 测试长整型  
  181.      *   
  182.      * @throws IOException  
  183. <l
    分享到:
    评论

相关推荐

    netty 在java中的字节码转换

    netty通信时经常和底层数据交互,C语言和java的数据类型和范围不同,通信时需要转化或兼容,附件为字节码、进制常用的转换类。

    JAVA上百实例源码以及开源项目源代码

     Java数据压缩与传输实例,可以学习一下实例化套按字、得到文件输入流、压缩输入流、文件输出流、实例化缓冲区、写入数据到文件、关闭输入流、关闭套接字关闭输出流、输出错误信息等Java编程小技巧。 Java数组倒置...

    java源码包---java 源码 大量 实例

     Java数据压缩与传输实例,可以学习一下实例化套按字、得到文件输入流、压缩输入流、文件输出流、实例化缓冲区、写入数据到文件、关闭输入流、关闭套接字关闭输出流、输出错误信息等Java编程小技巧。 Java数组倒置...

    JAVA上百实例源码以及开源项目

     Java数据压缩与传输实例,可以学习一下实例化套按字、得到文件输入流、压缩输入流、文件输出流、实例化缓冲区、写入数据到文件、关闭输入流、关闭套接字关闭输出流、输出错误信息等Java编程小技巧。 Java数组倒置...

    java源码包4

     Java数据压缩与传输实例,可以学习一下实例化套按字、得到文件输入流、压缩输入流、文件输出流、实例化缓冲区、写入数据到文件、关闭输入流、关闭套接字关闭输出流、输出错误信息等Java编程小技巧。 Java数组倒置...

    java源码包3

     Java数据压缩与传输实例,可以学习一下实例化套按字、得到文件输入流、压缩输入流、文件输出流、实例化缓冲区、写入数据到文件、关闭输入流、关闭套接字关闭输出流、输出错误信息等Java编程小技巧。 Java数组倒置...

    java源码包2

     Java数据压缩与传输实例,可以学习一下实例化套按字、得到文件输入流、压缩输入流、文件输出流、实例化缓冲区、写入数据到文件、关闭输入流、关闭套接字关闭输出流、输出错误信息等Java编程小技巧。 Java数组倒置...

    近5年133个Java面试问题列表

    数据类型转换的基本原则 垃圾回收(GC) Java 集合框架 数组 字符串 GOF 设计模式 SOLID (单一功能、 开闭原则、 里氏替换、 接口隔离以及依赖反转) 设计原则 抽象类与接口 Java 基础, 如 equals 和 hashcode ...

    java开源包11

    Java Remote Desktop 是一个Java 的远程桌面软件,支持很多特性例如文件传输、数据压缩、颜色转换、键盘鼠标事件转换等等。 最短路径算法实现 k-shortest-paths 这是一个实现了 Yen 的排名算法的无环路径的项目 ...

    java开源包4

    Java Remote Desktop 是一个Java 的远程桌面软件,支持很多特性例如文件传输、数据压缩、颜色转换、键盘鼠标事件转换等等。 最短路径算法实现 k-shortest-paths 这是一个实现了 Yen 的排名算法的无环路径的项目 ...

    java开源包6

    Java Remote Desktop 是一个Java 的远程桌面软件,支持很多特性例如文件传输、数据压缩、颜色转换、键盘鼠标事件转换等等。 最短路径算法实现 k-shortest-paths 这是一个实现了 Yen 的排名算法的无环路径的项目 ...

    java开源包101

    Java Remote Desktop 是一个Java 的远程桌面软件,支持很多特性例如文件传输、数据压缩、颜色转换、键盘鼠标事件转换等等。 最短路径算法实现 k-shortest-paths 这是一个实现了 Yen 的排名算法的无环路径的项目 ...

    java开源包9

    Java Remote Desktop 是一个Java 的远程桌面软件,支持很多特性例如文件传输、数据压缩、颜色转换、键盘鼠标事件转换等等。 最短路径算法实现 k-shortest-paths 这是一个实现了 Yen 的排名算法的无环路径的项目 ...

    java开源包5

    Java Remote Desktop 是一个Java 的远程桌面软件,支持很多特性例如文件传输、数据压缩、颜色转换、键盘鼠标事件转换等等。 最短路径算法实现 k-shortest-paths 这是一个实现了 Yen 的排名算法的无环路径的项目 ...

    java开源包8

    Java Remote Desktop 是一个Java 的远程桌面软件,支持很多特性例如文件传输、数据压缩、颜色转换、键盘鼠标事件转换等等。 最短路径算法实现 k-shortest-paths 这是一个实现了 Yen 的排名算法的无环路径的项目 ...

    java开源包10

    Java Remote Desktop 是一个Java 的远程桌面软件,支持很多特性例如文件传输、数据压缩、颜色转换、键盘鼠标事件转换等等。 最短路径算法实现 k-shortest-paths 这是一个实现了 Yen 的排名算法的无环路径的项目 ...

    java开源包3

    Java Remote Desktop 是一个Java 的远程桌面软件,支持很多特性例如文件传输、数据压缩、颜色转换、键盘鼠标事件转换等等。 最短路径算法实现 k-shortest-paths 这是一个实现了 Yen 的排名算法的无环路径的项目 ...

    java开源包1

    Java Remote Desktop 是一个Java 的远程桌面软件,支持很多特性例如文件传输、数据压缩、颜色转换、键盘鼠标事件转换等等。 最短路径算法实现 k-shortest-paths 这是一个实现了 Yen 的排名算法的无环路径的项目 ...

    成百上千个Java 源码DEMO 4(1-4是独立压缩包)

    Java数据压缩与传输实例 1个目标文件 摘要:Java源码,文件操作,数据压缩,文件传输 Java数据压缩与传输实例,可以学习一下实例化套按字、得到文件输入流、压缩输入流、文件输出流、实例化缓冲区、写入数据到文件、...

Global site tag (gtag.js) - Google Analytics