Archive

Archive for the ‘J2ME’ Category

Simple Class for HTTP Connection in Java Micro Edition

package network;

import java.io.InputStream;
import java.io.IOException;
import javax.microedition.io.HttpConnection;
import javax.microedition.io.Connector;
import javax.microedition.lcdui.*;

public abstract class HTTPSend extends Form implements Runnable,CommandListener{
    String HTTPErrMsg="",HTTPResponse="",URL="";
    Gauge gg=new Gauge("Koneksi Ke Server..",false,10,0);
    Command bck=new Command("Kembali",Command.BACK,0);

Read more…

Categories: J2ME, Java, RMS Tags: , ,

Simple Class for RMS in Java Micro Edition

package DbLokal;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import javax.microedition.rms.RecordEnumeration;
import javax.microedition.rms.RecordStore;
import javax.microedition.rms.RecordStoreException;
import javax.microedition.rms.RecordStoreNotOpenException;

/**
 *
 * @author Ratno Kustiawan
 */
public class tb {
    protected RecordStore rs;
    protected RecordEnumeration re;
    protected ByteArrayOutputStream baos;
    protected ByteArrayInputStream bais;
    protected DataOutputStream dos;
    protected DataInputStream dis;
    protected String name;
    protected String[] field,arrTemp;
    protected String[][] temp,temp2;
    protected int iCounter,r,j,len1,len2;

Read more…

Categories: J2ME, Java, RMS Tags: , , ,