Class SmapUtil.SDEInstaller

  • Enclosing class:
    SmapUtil

    private static class SmapUtil.SDEInstaller
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) byte[] gen  
      (package private) int genPos  
      (package private) static java.lang.String nameSDE  
      (package private) byte[] orig  
      (package private) int origPos  
      (package private) byte[] sdeAttr  
      (package private) int sdeIndex  
    • Constructor Summary

      Constructors 
      Constructor Description
      SDEInstaller​(byte[] classfile, byte[] sdeAttr)  
      SDEInstaller​(java.io.File inClassFile, byte[] sdeAttr, java.io.File outClassFile)  
      SDEInstaller​(java.io.File inClassFile, java.io.File attrFile, java.io.File outClassFile)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void addSDE()  
      (package private) void copy​(int count)  
      (package private) boolean copyAttrs​(int attrCount)  
      (package private) int copyConstantPool​(int constantPoolCount)  
      (package private) void copyMembers()  
      (package private) static byte[] install​(byte[] classfile, byte[] smap)  
      (package private) static void install​(java.io.File classFile, byte[] smap)  
      (package private) static void install​(java.io.File inOutClassFile, java.io.File attrFile)  
      (package private) static void install​(java.io.File inClassFile, java.io.File attrFile, java.io.File outClassFile)  
      static void main​(java.lang.String[] args)  
      (package private) void randomAccessWriteU2​(int pos, int val)  
      (package private) byte[] readBytes​(int count)  
      (package private) int readU1()  
      (package private) int readU2()  
      (package private) int readU4()  
      (package private) static byte[] readWhole​(java.io.File input)  
      (package private) void writeAttrForSDE​(int index)  
      (package private) void writeBytes​(byte[] bytes)  
      (package private) void writeU1​(int val)  
      (package private) void writeU2​(int val)  
      (package private) void writeU4​(int val)  
      (package private) void writeUtf8ForSDE()  
      • Methods inherited from class java.lang.Object

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

      • orig

        byte[] orig
      • sdeAttr

        byte[] sdeAttr
      • gen

        byte[] gen
      • origPos

        int origPos
      • genPos

        int genPos
      • sdeIndex

        int sdeIndex
    • Constructor Detail

      • SDEInstaller

        SDEInstaller​(byte[] classfile,
                     byte[] sdeAttr)
              throws java.io.IOException
        Throws:
        java.io.IOException
      • SDEInstaller

        SDEInstaller​(java.io.File inClassFile,
                     byte[] sdeAttr,
                     java.io.File outClassFile)
              throws java.io.IOException
        Throws:
        java.io.IOException
      • SDEInstaller

        SDEInstaller​(java.io.File inClassFile,
                     java.io.File attrFile,
                     java.io.File outClassFile)
              throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • install

        static void install​(java.io.File inClassFile,
                            java.io.File attrFile,
                            java.io.File outClassFile)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • install

        static void install​(java.io.File inOutClassFile,
                            java.io.File attrFile)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • install

        static void install​(java.io.File classFile,
                            byte[] smap)
                     throws java.io.IOException
        Throws:
        java.io.IOException
      • install

        static byte[] install​(byte[] classfile,
                              byte[] smap)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • readWhole

        static byte[] readWhole​(java.io.File input)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • addSDE

        void addSDE()
             throws java.io.UnsupportedEncodingException,
                    java.io.IOException
        Throws:
        java.io.UnsupportedEncodingException
        java.io.IOException
      • copyMembers

        void copyMembers()
      • copyAttrs

        boolean copyAttrs​(int attrCount)
      • writeAttrForSDE

        void writeAttrForSDE​(int index)
      • randomAccessWriteU2

        void randomAccessWriteU2​(int pos,
                                 int val)
      • readU1

        int readU1()
      • readU2

        int readU2()
      • readU4

        int readU4()
      • writeU1

        void writeU1​(int val)
      • writeU2

        void writeU2​(int val)
      • writeU4

        void writeU4​(int val)
      • copy

        void copy​(int count)
      • readBytes

        byte[] readBytes​(int count)
      • writeBytes

        void writeBytes​(byte[] bytes)
      • copyConstantPool

        int copyConstantPool​(int constantPoolCount)
                      throws java.io.UnsupportedEncodingException,
                             java.io.IOException
        Throws:
        java.io.UnsupportedEncodingException
        java.io.IOException
      • writeUtf8ForSDE

        void writeUtf8ForSDE()