calling a protected method in other packages [closed]


package com.example.sample; public class Test1; {     public enum EncodingFormat     {         _7Bits,_8Bits,Unknown;         protected String tosdkString()         {             switch(this)             {                 case _7Bits: return "7";                 case _8Bits: return "8";             }             return "";         }         static protected EncodingFormat fromString(String source)         {             switch(source)             {                 case "7": return _7Bits;                 case "8": return _8Bits;             }             return Unknown;         }     } } 
package com.example.destination;  import com.example.sample.test1;  public class Test2 extends Test1 {     protected Test2(SDK sdk)     {         m_sdk = sdk;     }      }     private void write(EncodingFormat encodeFormat) throws SdkException, WriteException     {          m_rbasdk.SetParam(PARAMETER_ID.P62_REQ_ENCODING_FORMAT, encodeFormat.tosdkString());     }  } 

Here I am getting error as tosdkString() has protected access in com.example.sample.test1.EncodingFormat. Can some one help me in resolving this issue.