[android-developers] Re: Reading from CERT.RSA from META-INF directory

2011-06-21 Thread Nate Totura

Ahh, I see what you are saying now, I have never used those (JarFile/
JarEntry) APIs before.

Thank you!

On Jun 15, 6:25 pm, Nikolay Elenkov nikolay.elen...@gmail.com wrote:
 On Thu, Jun 16, 2011 at 3:18 AM, Nate Totura ntot...@gmail.com wrote:
  To clarify, I would like to do this at runtime. Access to the
  certificate information at runtime is really what I want.

 That doesn't clarify much... If  want to read it from an apk,
 use JarFile.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Reading from CERT.RSA from META-INF directory

2011-06-15 Thread Nate Totura
To clarify, I would like to do this at runtime. Access to the
certificate information at runtime is really what I want.
-Nate

On Jun 14, 7:39 pm, Nikolay Elenkov nikolay.elen...@gmail.com wrote:
 On Wed, Jun 15, 2011 at 2:57 AM, Nate Totura ntot...@gmail.com wrote:
  Is it possible to read files in the META-INF directory such as the
  CERT.RSA file?

 Sure. What exactly are you trying to do? Read from jar file?
 Read from exploded jar file? What do you need those file for?
 You really need to provide more details to get a useful answer.



  I have tried the following:

   AssetFileDescriptor afd = am.openNonAssetFd(META-INF/CERT.RSA);

  but I get the exception:

   java.io.FileNotFoundException: This file can not be opened as a file
  descriptor; it is probably compressed

 Why are you using the AssetManager for this? If this is a jar/apk,
 look at JarFile/JarEntry for ideas.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Reading from CERT.RSA from META-INF directory

2011-06-15 Thread Nikolay Elenkov
On Thu, Jun 16, 2011 at 3:18 AM, Nate Totura ntot...@gmail.com wrote:
 To clarify, I would like to do this at runtime. Access to the
 certificate information at runtime is really what I want.

That doesn't clarify much... If  want to read it from an apk,
use JarFile.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en