Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7746233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:13:35+00:00 2026-06-01T10:13:35+00:00

Here is the thread that I read about making a stack of resources from

  • 0

Here is the thread that I read about making a stack of resources from AssetManager in Android.

What does it mean to “creating a stack of resources from AssetManager?” Do I have to use:

Stack stack = new Stack();
stack.push(this.getAssets());

Or something? If anyone can give hints, I appreciate it. If the question is not specific enough, please post in the comments about it, and I’ll improve the question. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T10:13:36+00:00Added an answer on June 1, 2026 at 10:13 am

    A Stack is just a collection of Objects, the same as an array, ArrayList, Collection, etc.

    The benefit of using a Stack is that you can simply push(Object o) objects in to the Stack to add them to the collection, and pop() objects off the Stack when you want to get them back. A Stack can grow to any size.

    You would probably need to do something like this…

    Stack stack = new Stack();
    AssetManager assets = this.getAssets();
    String[] assetLocations = assets.list();
    
    for (int i=0;i<assetLocations.length;i++){
        byte[] asset = loadAssetFromStream(assetLocations[i]); // you need to write this
        stack.push(asset);
    }
    

    AssetManager has an open() method for reading the assets – you’ll probably need to read each asset into memory (like a byte[] array or an actual Object) and then push each object into the stack.

    Refer to http://developer.android.com/reference/android/content/res/AssetManager.html for more information

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read it here : CodeProject and some other places that there should
I have a question about remote threads.I've read Mike Stall's article present here: <
The question here is: If a thread that acquiring an exclusive lock to an
Here: http://download.oracle.com/docs/html/A95907_01/diff_uni.htm#1077398 I found that on Windows Oracle is thread based, while on Unix
As I don't want to hijack another thread here comes my question about mappings.
Here is the situation: You have one long-running calculation running in a background thread.
I have android code that uses a background process to routinely (e.g. hourly) connect
I have code listed here: Threading and Sockets . The answer to that question
I'm having difficulty testing some logic that uses notifications. I've read about enforcing that
I've read several posts about java.net vs java.nio here on StackOverflow and on some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.