`
文章列表
import java.io.BufferedInputStream;import java.io.BufferedOutputStream;import java.io.File;import java.io.FileOutputStream;import java.io.IOException;import java.io.OutputStream;import java.util.Enumeration;import java.util.zip.ZipEntry;import java.util.zip.ZipFile;import android.content.ContentResol ...
config.xml <?xml version="1.0" encoding="utf-8"?><resources>    <string name="tvata_player_package_name">com.vatata.player</string>    <string name="tvata_player_service_action">com.vatata.player.service.PlayerService</string& ...

WiFiUitl

import android.bluetooth.BluetoothAdapter;import android.content.Context;import android.net.wifi.WifiInfo;import android.net.wifi.WifiManager;import android.util.Log;public class WiFiUitl {    /**     * 获取蓝牙是否打开     * @return     */    public static  boolean getBluetoothState(){        BluetoothAdapt ...
import java.net.InetAddress;import java.net.NetworkInterface;import java.net.SocketException;import java.util.Enumeration;import java.util.List;import android.content.Context;import android.net.ConnectivityManager;import android.net.NetworkInfo;import android.net.wifi.WifiInfo;import android.net.wifi ...
source code: import android.content.Context;import android.content.res.TypedArray;import android.util.AttributeSet;import android.widget.LinearLayout;import android.widget.TextView;public class MyView extends LinearLayout {    public MyView(Context context, AttributeSet attrs) {        super(contex ...

RSA

    博客分类:
  • Java
package com.client.rsa;import java.io.ByteArrayOutputStream;import java.io.IOException;import java.math.BigInteger;import java.security.KeyPair;import java.security.KeyPairGenerator;import java.security.NoSuchAlgorithmException;import java.security.interfaces.RSAPrivateCrtKey;import java.security.i ...

消息拆包

    博客分类:
  • Java
7E.....7E public static List<byte[]> msgUnPkg(final byte[] msg){           List<byte[]> msgBytes=new LinkedList<byte[]>();           int i=0;           int k=0,index=0;           while(i<msg.length){               if(msg[i]==0x7E){                   if(index%2!=0){              ...

java httpclient

    博客分类:
  • Java
package com.zhonghong.tsp.util;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStream;import java.io.InputStreamReader;import java.util.ArrayList;import java.util.Iterator;import java.util.List;import java.util.Map;import javax.servlet.ServletException;import javax.servle ...
public class SerialHandleBean implements SerialPortEventListener { CommPortIdentifier portId; SerialPort serialPort; private OutputStream out; private InputStream in; String Buf=null;// 缓存一条最新信息 boolean hasData=false;// 标志有无新数据 Thread readThread; static { System.setSecurityMana ...

消息构造器

    博客分类:
  • Java
public class MessageArrayBuilder {     private int capacity = 20;         private int length = 0;     public void setCapacity(int capacity) {         if (capacity > 0) {             this.capacity = capacity;         }     }     public MessageArrayBuilder() {}     public MessageArrayBuil ...

TypeChangeUtil

    博客分类:
  • Java
public class TypeChangeUtil {     /**      * 把int转成DWORD      */     public static byte[] IntToDWORD(int val){         byte[] result = new byte[4];         String binary = Integer.toBinaryString(val);         StringBuffer buffer = new StringBuffer(binary);         for(int i=binary.length();i& ...

log4j.properties 使用

    博客分类:
  • Java
log4j.properties 使用 一.参数意义说明 输出级别的种类 ERROR、WARN、INFO、DEBUG ERROR 为严重错误 主要是程序的错误 WARN 为一般警告,比如session丢失 INFO 为一般要显示的信息,比如登录登出 DEBUG 为程序的调试信息 配置日志信息输 ...
firefox        image/jpeg      image/bmp        image/gif        image/png  ie 6      image/pjpeg       image/bmp       image/gif       image/x-png  ie 7      image/pjpeg      image/bmp       image/gif       image/x-png  ie 8      image/pjpeg      image/bmp       image/gif       image/x-png

trigger

create or replace TRIGGER tiuda_t_car BEFORE INSERT OR UPDATE OF v_plate_number,v_car_number,v_car_tel,n_userid or delete ON T_CAR  FOR EACH ROW /******************************************************* **  程序类别 : TRIGGER             **  说明:通过trigger实现数据的更新与插入                      *********** ...

javaee 限制登录

    博客分类:
  • Java
public class LoginSessionListener   implements HttpSessionAttributeListener{     private static final String MEMBER="member";     Map<String,HttpSession> map = new HashMap<String,HttpSession>();     @Override     public void attributeAdded(HttpSessionBindingEvent event) {   ...
Global site tag (gtag.js) - Google Analytics