FileDocCategorySizeDatePackage
TestService.javaAPI DocJava Card1468Wed Mar 22 21:07:22 GMT 2006com.sun.javacard.samples.ServiceDemo

TestService

public class TestService extends BasicService

Fields Summary
Constructors Summary
Methods Summary
public booleanprocessCommand(APDU command)

        
        
        
        //        receiveInData(command);
        
        if(getINS(command) == (byte)1) {
            setOutputLength(command, (short)1);
            command.getBuffer()[5] = (byte) 0xAB;
            succeedWithStatusWord(command, (short) 0x6617 );
            
            return true;
        }
        
        if(getINS(command) == (byte)2) {
//            receiveInData(command);
//            succeed(command);

            setOutputLength(command, (short)0);

            succeedWithStatusWord(command, (short) 0x6618 );

            return true;
        }

        if(getINS(command) == (byte)3) {
//            receiveInData(command);

            setOutputLength(command, (short)0);
            succeed(command);
            return true;
        }
        
        if(getINS(command) == (byte)3) {
            receiveInData(command);

            setOutputLength(command, (short)0);
            succeed(command);
            return true;
        }
        
        return false;