InputStreams for HTTP [S] response data: confirm a minimum memory buffer/reading early?

I need to manage data from a web service response. The format of the response data is under my control and is returned as a stream (net.rim.device.api.crypto.tls.TLSInputStream) to my BlackBerry application. The content of the feed is an XML stream that contains simple header information and then one or more 'chunks' of data. The data is compressed (gzip) and coded (Base64). BB app must decrypt, decompress, and then process the data in the stream. For the purposes of my application, I never need all of the data at a time; processing flow for real, that's what I'm looking for. I've implemented a pipe which, in pseudocode, looks like this:

SecureConnection httpsConn; already implemented

InputStream httpsStream = httpsConn.openInputStream ();

InputStream compressedStream = new (Base64InputStream.decode (httpsStream));

InputStream is = new GZIPInputStream (compressedStream);

int aByte = is.read ();

The goal is to put buffer in the bit data as possible so that the operation on the side of BB is not intensive memory as the data grows. The effective implementation of this pseudo code works very well.

The question I have is: I can confirm that the httpsStream I have created from the httpsConn is completely not himself read the BB in the specific RIM code? In other words, if there are 20 MB of data in the stream, I don't want to know that the stream has read data HTTPS completely - 20 MB all - and then put at disposal. Instead, I want to know only as much data is consumed as I makes (is.read) as well as a small buffer, perhaps, for the effectiveness of the network. A third way to ask the question: I think that it is supposed to be the definition of a well implemented InputStream, but I'm having a hard time finding a definitive '' Yes, J2ME (or BB) InputStreams promise to read HTTPS data on request and not all at once.

I expect tons of streaming audio and video apps are partial evidence that works real data on the fly on the Net.  Still, I left the details as XML processing by SAX - it's one on the behavior of the InputStream HTTP [S].  But it brings the fourth way to phrase my question: if I use SAX instead of a tool of DOM to treat my HTML because I want to monitor the pressures of large data flows, will I get cancelled by buffering I can't control in the low-level InputStream HTTP [S]?

Before you say, ' HTTP [S] is not where you should make streaming ", this is not streaming in itself. It is instead one - possibly large - answer to a POST.  Highly 'typical' web interaction

If changes in response based on the version of the OS, presumably 4.6 or better is the target platform.

Thank you!

-Del

I don't remember the said documentation. All I remember is that I proposed of workaround to someone on this forum and they later confirmed that he has solved the problem of buffering (they were streaming audio as great answers HTTP - streaming started to work very well, without a lot of latency).

Tags: BlackBerry Developers

Similar Questions

  • Cannot read the data in the Micro memory card reader

    Original title: Micro memory card reader

    When I plugged in my card reader to the USB port windows says that the device has been installed and ready, but my pictures came not, where should I go to find them. Am I missing something?

    Hello

    1. What happens when you connect the card reader to a different USB port?
    2. Are you able to see the pictures when connected to another computer?

    I suggest you save that data if it works on another computer and then try to format the card reader to the NTFS file system

    How to get in shape?

    1. open computer management by clicking the Start button, click on the Control Panel, clicking system and Maintenance, clicking Administrative Tools, and then double-click computer management.  If you are prompted for an administrator password or a confirmation, type the password or provide confirmation.

    2. in the Navigation pane, under storage, click Disk Management.

    3. right click on the volume that you want to format and then click on format.

    4. to format the volume with the default settings, in the dialog box format, click OK, and then click OK again.

  • Invoke camera response data

    I searched it and found another thread, but I did not understand where to put the response code that was found as a solution.  I also thought that if I replied to this thread I would probably not get very much help since it is more than half a year and was marked as resolved.

    Here's my C++ code:

    void App::InvokeCamera()
    {
        bb::system::InvokeManager manager;
        bb::system::InvokeRequest request;
        request.setTarget("sys.camera.card");
        request.setAction("bb.action.CAPTURE ");
        InvokeTargetReply *targetReply = manager.invoke(request);
    }
    

    I want to retrieve the path of the saved image so that I can access it in my application.

    What and where should I put the response data?

    Kind regards

    It's its own method. It's using Qt signals and Slots feature. You can read about it here:

    https://developer.BlackBerry.com/native/documentation/Cascades/dev/signals_slots/index.html

    It is quite fundamental to development in stunts, so I strongly recommend that you develop a solid understanding of it.

    For example, you can try https://github.com/blackberry/Cascades-Samples/blob/master/invokeclient/src/app.cpp and https://github.com/blackberry/Cascades-Samples/tree/master/invoketarget

  • Get errors for the user input data filter no KB 911895 HID

    OT: iI have windows xp S/P 3 installed also apple i pad I get errors for the user input data filter no KB 911895 HID
    What should I do to get rid of this popup that wizzard windows keeps giving me?

    Hi Graybeard,

    What is the exact error message you get?

    HID Non-User Input data filter is an optional update. I suggest you try the steps from the following link:

    The screen saver does not start after the installation of a wireless pointing device
    http://support.Microsoft.com/kb/913405

    What version of the operating system Windows am I running?
    http://Windows.Microsoft.com/en-us/Windows7/help/which-version-of-the-Windows-operating-system-am-i-running

    Troubleshooting Windows Update or Microsoft Update when you are repeatedly offered an update
    http://support.Microsoft.com/kb/910339

  • This device cannot start. (Code 10) Click on 'Search for solutions' to send data about this device to Microsoft and to see if there is a solution available.

    Map #2 Microsoft Tun Miniport
    This device cannot start. (Code 10)  Click on 'Search for solutions' to send data about this device to Microsoft and to see if there is a solution available.
    ???

    Hi AnaSk,

    (1) since when are you facing this problem?

    (2) remember to make changes?

    The Code 10 error applies mainly to the problems of hardware driver and devices or compatibility problems between the drivers of equipment and additional software that is installed in Windows.

    Download and install the latest drivers from the computer's network adapter or the website of the manufacturer of the device.

    See the article below

    Description of errors related to the 10 Code that generates the Device Manager in Windows on computers
    http://support.Microsoft.com/kb/943104

  • probably caused by the settings of the firewall on your computer. Check the settings for HTTP port (80), HTTPS port (443) and FTP.

    Change the title: internet connection.

    Unable to connect to the internet, suddenly, message that I can't connect to the internet using HTTP<>< or="" ftp.="" thios="" is="" probably="" caused="" by="" firewall="" settings="" on="" your="" computer.="" check="" settings="" for="" http="" port(80),="" https="" port(443)="" and="" ftp.="" funny="" i="" was="" just="" on="" the="" net="" not="" more="" than="" 10="" minutes="" prior="" to="" this.="" checked="" all="" conections-="" good.="" what's="" my="" next="">

    Try a system restore to a Date before the problem began:

    Restore point:

    http://www.howtogeek.com/HOWTO/Windows-Vista/using-Windows-Vista-system-restore/

    Do Safe Mode system restore, if it is impossible to do in Normal Mode.

    Try typing F8 at startup and in the list of Boot selections, select Mode safe using ARROW top to go there > and then press ENTER.

    Try a restore of the system once, to choose a Restore Point prior to your problem...

    Click Start > programs > Accessories > system tools > system restore > choose another time > next > etc.

    http://www.windowsvistauserguide.com/system_restore.htm

    Read the above for a very good graph shows how backward more than 5 days in the System Restore Points by checking the correct box.

    See you soon.

    Mick Murphy - Microsoft partner

  • I need a free software to use for all my students data registration

    I need a free software to use for recording of all data from my students to my computer

    sage180

    If you mean the personal info, then http://www.libreoffice.org/

  • How to check the type of datamodel in case of response data from application of DataByConstraint in the plugin development web vsphere client

    Hello, I am new in plugin development web vsphere client.

    I need to send multiple DataByConstraintRequest (say A and B data model class) within a class of script simple action. But to handle events of response data, we use

    [ResponseHandler (name = "{com.vmware.data.query.events.DataByConstraintRequest.RESPONSE_ID}")]

    public void onVmListRetrieved (request: DataByConstraintRequest,)

    result: collection ArrayCollection): void {}

    The result is an ArrayCollection of MyVmData of the objects collection

    }

    Here how should I come to know this result variable is either A or class B data model. (including the result can be a collection of empty array)

    In case of DataByModel, we have events in response to the separate data for the data model class, but I couldn't find the same for DataByConstraint.

    You can define a unique ID_Demande for each DataByConstraintRequest and check in the response Manager.  'requestId' is a field of the class of basic DataRequest.

  • How to customize the font, size, color for no display of data message?

    Hi Experts,


    I have a requirement to customize data for no display of data message, now they want it to be in the same format to display the title of this report, so in my case, its font size is 15 and the color is dark blue, then no message data must also display in the same font, size and color. How can I get this please can anyone help me on what your answers are really useful for me that the requirement is very urgent.


    Kind regards

    Laeticia.

    Hello
    See my o/p sample:

    http://imgur.com/JvxxR

    hope this will help you...

    Thank you
    Deva

  • The HTTP header response

    I want to see the vary: user-agent in HTTP header response. Can anyone suggest me steps to implement this pls

    It depends on the requirements when you want to see it?
    If you want to a particular page, then you can write a droplet, getHeader variable User-Agent and set the header of the response of the dynamo.
    If you wish for any application then you write a servlet pipeline User-Agent getHeader variable and set the response header in the request pipeline (pipeline DAF).

  • It is advisable to use HTMLDB_COLLECTION for large volume of data pump?

    Hello

    It is advisable to use HTMLDB_COLLECTION for large volume of data pump?
    I need to store records of morethan 1,00,000 on the fly to display in the report.

    Concerning
    Mohan

    Hello

    When you change internal APEX your database object is not supported?
    This means that you can not contact Oracle support.

    Kind regards
    Jari

    http://dbswh.webhop.NET/dbswh/f?p=blog:Home:0

  • logic to write business rules for filling in the data since a dataform to anoth

    Hi all


    What is the logic that I use for data stand from one form to another form

    For example:

    Plan 1 data of level 0 dataform as complete as plan 2 dataform the parent value.

    am not understand what logic I use please help me write this business rule.

    Thanks in advance

    FYI, SM.

    Published by: user13385347 on August 25, 2011 03:29

    Published by: user13385347 on August 25, 2011 03:32

    You must give the alias to the location of the cube source within the @xref function.

    An example is

    @XREF("_RevCube_","Prg_Queue","Training Revenue","ServiceType")
    

    See the technical reference Essbase for more details

    http://download.Oracle.com/docs/CD/E12825_01/EPM.111/esb_techref/frameset.htm?CopyRite.htm

    Kind regards
    Brig.

  • Safari does not not for HTTP

    I can't open my MacBook-based HTTP Web sites (tried all browsers - Safari, Firefox, Chrome)... However the same Web sites works very well for HTTPS... Suggestions of what went wrong?

    You might have installed some kind of malware. That might solve the problem: https://www.malwarebytes.com/antimalware/mac/

    If not, report

  • How to use mobile data for large app download data

    How to use mobile data for large app download data

    How can I set big data

  • How will I know if I am being charged for the use of data on the mini2 ipad

    How will I know if I am to be charged or billed for usage on my ipad mini data 2?

    Hello

    You can be charged for the use of data on an ipad, if it has a SIM card

    Cellular data.

    If your home wifi is unlimited you will not be charged more.

    Unless your WiFi has a hat of data ie download limit.

    See you soon

    Brian

Maybe you are looking for

  • Spam is no longer an option. Only quarantine appears

    Recently, the 'spam' is not an option. 'Quarantine' don't access these emails that should appear as spam. Occcasionally an email that should appear on the normal screen goes to spam and I can no longer pull it up.

  • Call a phone in Skype video

    Hello, I have 10 windows who has Skype video, so I would like to ask if I could call someone's phone number.

  • Video drivers for Vaio model # PCG - 61411L

    Replaced the hard drive crashed and necessary, and I can easily install various forms of win7/8, but it seems that it is of type NVidia 310 M gpu in the present and the driver must come from the Sony (re: NVidia site). I could not find any informatio

  • Laptop HP Stream: black screen at home

    My home screen is black after I unlock my mobile and I can not see or I click on what anyone, that I can do to fix this?

  • Scam AVG

    I've been compromised by AVG and it also attached to the piroform ccleaner.  I'm afraid it's going in my bank details.  What can I do?