易截截图软件、单文件、免安装、纯绿色、仅160KB

年底收藏系列 Java安全工具,生成MD5,Base64,UUID


/*
* EncryptUtils.java
* Copyright (C) 2007-3-19 <JustinLei@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
package org.lambdasoft.utils;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.Date;
import java.util.UUID;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
/**
* @author TangLei <justinlei@gmail.com>
* @date 2008-11-28
*/
public class EncryptUtils {
static final int S11 = 7;
static final int S12 = 12;
static final int S13 = 17;
static final int S14 = 22;
static final int S21 = 5;
static final int S22 = 9;
static final int S23 = 14;
static final int S24 = 20;
static final int S31 = 4;
static final int S32 = 11;
static final int S33 = 16;
static final int S34 = 23;
static final int S41 = 6;
static final int S42 = 10;
static final int S43 = 15;
static final int S44 = 21;
static final byte[] PADDING = { -128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0 };
private long[] state = new long[4]; // state (ABCD)
private long[] count = new long[2]; // number of bits, modulo 2^64 (lsb first)
private byte[] buffer = new byte[64]; // input buffer
public static String digestHexStr;
private static byte[] digest = new byte[16];
public


相关文档:

java使用rocksaw和vserv tcpip实现基于ICMP的Ping功能

一:准备 www.savarese.org download
 1.  rocksaw-1.0.0-src.tar.gz
 2.  vserv-tcpip-0.9.2-src.tar.gz
二:编译源文件得到jar包 使用Ant
 1.  build vserv-tcpip-0.9.2-src
      在vserv-tcpip-0.9.2目录下面建一个tests目录,然后在cmd窗口下进入 ......

Java读写cookie

转自:http://www.blogjava.net/action/archive/2007/04/10/109574.html
         http://www.javaeye.com/topic/232662
1.设置Cookie
1Cookie cookie = new Cookie("key", "value");
2cookie.setMaxAge(60); //设置60秒生存期,如果设置为负值 ......

某公司java笔试题

最近在找一些笔试题,因为快找工作了。。
题目如下:
问答题   
1.数据连接池的工作机制   
2.Struts标签中<html:errors>的作用是什么   
3.Tomcat<CATALINA_HOME>根目录下\server,\common,\shared以及\WEB-INF下的lib中的jar文件在使用时的区别。   
填空题 &n ......

java学习资料站

1、 http://java.sun.com/ ;;(英文)
Sun的Java网站,是一个应该经常去看的地方。不用多说。
2、 http://www-900.ibm.com/developerWorks/cn/ ;;
IBM的developerWorks网站,英语好的直接去英文主站点看。这里不但是一个极好的面向对象的分析设计网站,也是Web Services,Java,Linux极好的网站。强烈推荐!!!
3、 h ......

20个非常有用的Java程序片段

1. 字符串有整型的相互转换
  Java代码
  String a = String.valueOf(2);   //integer to numeric string
  int i = Integer.parseInt(a); //numeric string to an int
  2. 向文件末尾添加内容
  Java代码
  BufferedWriter out = null;
  try {
  out = new BufferedWriter(new FileWr ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号