易截截图软件、单文件、免安装、纯绿色、仅160KB
热门标签: c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 最新文章 : java

java j2me 使用M3G封装

 
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.game.GameCanvas;
import javax.microedition.m3g.Camera;
import javax.microedition.m3g.Graphics3D;
import javax.microedition.m3g.Loader;
import javax.microedition.m3g.World;
import javax.microedition.midlet.MIDlet;
public class RMMIDlet extends MIDlet implements CommandListener {
  private Display myDisplay = null;
  private RetainedCanvas myCanvas = null;
  private Command exitCommand = new Command("Exit", Command.ITEM, 1);
  public RMMIDlet() {
    super();
    myDi ......

java 解密PDF格式文件

import java.io.FileOutputStream;
import com.lowagie.text.pdf.PdfEncryptor;
import com.lowagie.text.pdf.PdfReader;
import com.lowagie.text.pdf.PdfStamper;
import com.lowagie.text.pdf.PdfWriter;
public class MainClass {
  public static void main(String[] args) throws Exception {
    PdfEncryptor
        .encrypt(new PdfReader("1.pdf"), new FileOutputStream("Encrypted2.pdf"),
            "Hello".getBytes(), "World".getBytes(), PdfWriter.AllowDegradedPrinting,
            PdfWriter.STRENGTH128BITS);
    // decrypt the file
    PdfReader reader = new PdfReader("Encrypted2.pdf", "World".getBytes());
  &nbs ......

java 加密文件Pdf

import java.io.FileOutputStream;
import com.lowagie.text.pdf.PdfEncryptor;
import com.lowagie.text.pdf.PdfReader;
import com.lowagie.text.pdf.PdfStamper;
import com.lowagie.text.pdf.PdfWriter;
public class MainClass {
  public static void main(String[] args) throws Exception {
    PdfReader reader = new PdfReader("1.pdf");
    PdfStamper stamper = new PdfStamper(reader, new FileOutputStream("Encrypted1.pdf"));
    stamper.setEncryption("Hello".getBytes(), "World".getBytes(), PdfWriter.AllowPrinting
        | PdfWriter.AllowCopy, PdfWriter.STRENGTH40BITS);
    stamper.close();
    getEncryptionInformation("1.pdf", null);
    getEncryptionInformation("Encrypted ......

java 获取PDF加密信息

import java.io.FileOutputStream;
import com.lowagie.text.pdf.PdfEncryptor;
import com.lowagie.text.pdf.PdfReader;
import com.lowagie.text.pdf.PdfStamper;
import com.lowagie.text.pdf.PdfWriter;
public class MainClass {
  public static void main(String[] args) throws Exception {
    PdfReader reader = new PdfReader("1.pdf");
    PdfStamper stamper = new PdfStamper(reader, new FileOutputStream("Encrypted1.pdf"));
    stamper.setEncryption("Hello".getBytes(), "World".getBytes(), PdfWriter.AllowPrinting
        | PdfWriter.AllowCopy, PdfWriter.STRENGTH40BITS);
    stamper.close();
    getEncryptionInformation("1.pdf", null);
    getEncryptionInformation("Encrypted ......

java 门面模式

class A {
  public A(int x) {
  }
}
class B {
  public B(long x) {
  }
}
class C {
  public C(double x) {
  }
}
public class Facade {
  static A makeA(int x) {
    return new A(x);
  }
  static B makeB(long x) {
    return new B(x);
  }
  static C makeC(double x) {
    return new C(x);
  }
  public static void main(String args[]) {
    // The client programmer gets the objects by calling the static methods:
    A a = Facade.makeA(1);
    B b ......

java 基本Singleton模式

 
public class BasicSingleton {
  static Singleton s1 = null, s2 = null;
  public static void main(String[] args) {
    s1 = Singleton.getInstance();
    s2 = Singleton.getInstance();
  }
}
class Singleton {
  private static Singleton mySingleton = null;
  private Singleton() {
  }
  public static synchronized Singleton getInstance() {
    if (null == mySingleton) {
      mySingleton = new Singleton();
      System.out.println(mySingleton.toString());
    } else {
      System.out.println(mySingleton.toString());
 &n ......
总记录数:6386; 总页数:1065; 每页6 条; 首页 上一页 [978] [979] [980] [981] 982 [983] [984] [985] [986] [987]  下一页 尾页
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号