Class Main


  • public class Main
    extends java.lang.Object
    Main program of the JavaCard DeCoder
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static java.lang.String[] compNames  
      (package private) java.lang.String[] cPoolStrings  
      (package private) boolean DebugFlag  
      (package private) static int EXPORT_MAGIC  
      (package private) static int HEADER_MAGIC  
      private static char[] hexTable  
      static I18NResourceBundle i18n  
      (package private) java.util.ArrayList<java.lang.Integer> methodsLengths  
      (package private) java.util.ArrayList<java.lang.Integer> methodsOffsets  
      (package private) java.io.PrintWriter out
      The stream where error message are printed.
      (package private) boolean printDetails  
      (package private) java.lang.String program
      Name of the program.
      (package private) static java.lang.String[] refNames  
      (package private) int shift  
    • Constructor Summary

      Constructors 
      Constructor Description
      Main​(java.io.PrintWriter out, java.lang.String program)
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) java.io.DataInputStream beginComponent​(java.lang.String inpName)  
      (package private) static java.lang.String compName​(int compNum)  
      boolean decode​(java.lang.String[] argv)
      Run the decoder
      (package private) void decodeApplet​(java.lang.String inpName)  
      (package private) void decodeAttr​(java.io.DataInputStream in)  
      (package private) void decodeClass​(java.lang.String inpName)  
      (package private) void decodeConstantPool​(java.lang.String inpName)  
      (package private) void decodeDescriptor​(java.lang.String inpName)  
      (package private) void decodeDirectory​(java.lang.String inpName)  
      (package private) void decodeExp​(java.lang.String inpName)  
      (package private) void decodeExport​(java.lang.String inpName)  
      (package private) void decodeHeader​(java.lang.String inpName)  
      (package private) void decodeImport​(java.lang.String inpName)  
      (package private) void decodeMethod​(java.lang.String inpName)  
      (package private) void decodeRefLocation​(java.lang.String inpName)  
      (package private) void decodeStaticField​(java.lang.String inpName)  
      (package private) void endComponent​(java.io.DataInputStream in)  
      void error​(java.lang.String msg)  
      static void main​(java.lang.String[] argv)
      Main program
      (package private) void out_begin​(java.lang.String s)  
      (package private) void out_end​(java.lang.String s)  
      (package private) void out_print​(java.lang.String s)  
      (package private) void out_println​(java.lang.String s)  
      (package private) void printByteHex​(java.io.PrintWriter out, int b)  
      (package private) void printBytes​(java.io.DataInputStream in, int len)  
      (package private) void printClassref​(java.io.DataInputStream in)  
      (package private) java.lang.String startArray​(int length)  
      (package private) static java.lang.String toHex​(long val)  
      (package private) static java.lang.String toHex​(long val, int width)  
      void usage()
      Usage
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • program

        java.lang.String program
        Name of the program.
      • out

        java.io.PrintWriter out
        The stream where error message are printed.
      • DebugFlag

        boolean DebugFlag
      • printDetails

        boolean printDetails
      • shift

        int shift
      • hexTable

        private static final char[] hexTable
      • compNames

        static java.lang.String[] compNames
      • cPoolStrings

        java.lang.String[] cPoolStrings
      • methodsLengths

        java.util.ArrayList<java.lang.Integer> methodsLengths
      • methodsOffsets

        java.util.ArrayList<java.lang.Integer> methodsOffsets
      • refNames

        static java.lang.String[] refNames
    • Constructor Detail

      • Main

        public Main​(java.io.PrintWriter out,
                    java.lang.String program)
        Constructor.
    • Method Detail

      • toHex

        static java.lang.String toHex​(long val,
                                      int width)
      • toHex

        static java.lang.String toHex​(long val)
      • printByteHex

        void printByteHex​(java.io.PrintWriter out,
                          int b)
      • out_begin

        void out_begin​(java.lang.String s)
      • out_print

        void out_print​(java.lang.String s)
      • out_println

        void out_println​(java.lang.String s)
      • out_end

        void out_end​(java.lang.String s)
      • startArray

        java.lang.String startArray​(int length)
      • printBytes

        void printBytes​(java.io.DataInputStream in,
                        int len)
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • compName

        static java.lang.String compName​(int compNum)
      • decodeAttr

        void decodeAttr​(java.io.DataInputStream in)
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeExp

        void decodeExp​(java.lang.String inpName)
                throws java.io.IOException
        Throws:
        java.io.IOException
      • beginComponent

        java.io.DataInputStream beginComponent​(java.lang.String inpName)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • endComponent

        void endComponent​(java.io.DataInputStream in)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeHeader

        void decodeHeader​(java.lang.String inpName)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeDirectory

        void decodeDirectory​(java.lang.String inpName)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeApplet

        void decodeApplet​(java.lang.String inpName)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeImport

        void decodeImport​(java.lang.String inpName)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeConstantPool

        void decodeConstantPool​(java.lang.String inpName)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • printClassref

        void printClassref​(java.io.DataInputStream in)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeClass

        void decodeClass​(java.lang.String inpName)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeDescriptor

        void decodeDescriptor​(java.lang.String inpName)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeMethod

        void decodeMethod​(java.lang.String inpName)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeStaticField

        void decodeStaticField​(java.lang.String inpName)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeRefLocation

        void decodeRefLocation​(java.lang.String inpName)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeExport

        void decodeExport​(java.lang.String inpName)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • error

        public void error​(java.lang.String msg)
      • usage

        public void usage()
        Usage
      • decode

        public boolean decode​(java.lang.String[] argv)
        Run the decoder
      • main

        public static void main​(java.lang.String[] argv)
        Main program