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 7498781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T19:35:44+00:00 2026-05-29T19:35:44+00:00

Flex front-end using AMF to Java back. Trying to read, in real-time, a file

  • 0

Flex front-end using AMF to Java back.
Trying to read, in real-time, a file that is being written to. For example, a log.

I’m using Java’s RandomAccessFile class to read the “new” lines of the file and send them back to the UI as a byte array along with the byte offset to start reading from next time.

Using an mx:List to display all lines of the text file.

The problem I’m running into, is Flex, or Flash Player, running out of memory on mildly large files, >25MB.
Is there any preferred method of displaying large amounts of text data in Flex that I’m missing? Or does Flex/Flash just handle this poorly and I’m basically screwed?

Thanks.

  • 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-05-29T19:35:45+00:00Added an answer on May 29, 2026 at 7:35 pm

    If 25MB is only mildly large then I’d say you probably need to page the data into the component, and simple store just a couple of pages in memory at a time. I’d probably pick something like TextArea over List, but creating seamless scrolling for a TextArea could be difficult if you don’t have all the data which sounds like what you’ll have to do. So stick with List for now, and figure out how many lines you want to make a page. And implement your backend as a method like:

    // service call interface
    public Page getPage( int lineStart, int lines );
    
    // response object from the service call
    public class Page {
        private var _totalLines:int;
        private var _lineStart:int;
        private var _lineEnd:int;
    
        [ArrayElementType("String")]
        private lines:ArrayCollection;
    }
    

    Then you can load a page and store X number of pages in memory, but use the totalLines in the file to know how big your model is so the scrollbar can render properly. You’ll just need to build a paging dataprovider that loads pages not yet loaded, and ditches pages if they aren’t displayed or pages that are furthest from what’s being displayed.

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

Sidebar

Related Questions

I have written a RIA using flex for the front-end and Java servlet for
I'm working on a Java web application (Adobe Flex front-end, JPA/Hibernate/BlazeDS/Spring MVC backend) and
I am starting a web application project that will have an Adobe Flex front-end
I'm developing an app with a Flex-based front end and a Spring/Hibernate back-end. To
I have a project with a RESTful Rails back-end and a Flex front-end, first
So far, I've had great success using PyAMF to communicate between my Flex front-end
Im working with a flex application that pulls data from a java class file
Preferably something that integrates well with a Flex front end. Yes the Spring Security
I would like to transfer a file from the Flex front end to a
Greetings! I am trying to build an application which has a flex front-end and

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.