The HTTP buffer size

In the API, RIM gives us the following code,

void getViaContentConnection(String url) throws IOException {         ContentConnection c = null;         DataInputStream is = null;         try {             c = (ContentConnection)Connector.open(url);             int len = (int)c.getLength();             dis = c.openDataInputStream();             if (len > 0) {                 byte[] data = new byte[len];                 dis.readFully(data);             } else {                 int ch;                 while ((ch = dis.read()) != -1) {                     ...                 }             }         } finally {             if (dis != null)                 dis.close();             if (c != null)                 c.close();         }     }

My problem is, I have a file which is usually about 10 k, what I download in my application. It returns-1 as the length so he then attempts to download the file byte-by-byte. It takes forever. I tried to add a fixed 1 KB buffer size, but the end of the file is cut off. What can I do to keep fast download speeds and the end of the capture file?

Thank you

Greg


Tags: BlackBerry Developers

Similar Questions

  • The log buffer size

    Hello
    Could someone please confirm that the following query returns log buffer size is correct?
    select 
       a.ksppinm name, 
       b.ksppstvl value, 
       a.ksppdesc description
    from
       x$ksppi a, 
       x$ksppcv b
    where 
       a.indx = b.indx
    and 
       a.ksppinm = '_ksmg_granule_size';
    The reason I ask is this log_buffer parameter in v$ parameter in my database has a value of 7024640, while the query return 4194304.

    Thank you.

    Hello..

    The '_ksmg_granule_size' "shows the size of granule not size log_buffer. If the total size of the SGA is equal to or less than 1 GB, then granule size is 4 MB. For greater than 1 GB EAG, granule size is 16 MB.

    What is the size of the SGA of your database.

    For my database SGA > 1 GB the output of the query is 16 MB
    {code}
    21:41:47 TEST > value col to a25
    21:41:56 TEST > col DESCRIPTION for a30
    21:42:05 TEST >
    21:42:05 TEST >
    21:42:05 TEST >
    21:42:05 TEST > select
    21:42:08 2 a.ksppinm name,
    21:42:12 3 b.ksppstvl value,
    21:42:12 4 a.ksppdesc description
    21:42:12 5 of
    21:42:12 6 x$ ksppi has.
    21:42:12 x $7 ksppcv b
    21:42:12 8 where
    21:42:12 a.indx 9 = b.indx
    21:42:12 10 and
    21:42:12 11 a.ksppinm = '_ksmg_granule_size ';

    NAME VALUE DESCRIPTION
    -------------------- ------------------------- ------------------------------
    granule _ksmg_granule_size 16777216 bytes in size
    {code}

    HTH
    Anand

  • the ad7476A buffer size and device

    Hi, I use the BF Analog read ad7476a (modified) vi.

    But I can't get the size I want filled a tampon...

    Somehow I think the buffer is limited to an array of 128 items, but I've set with 256, when I show the initialized array, it says I have 128 elements... together using array size it shows 256...

    If this is a limitation of blackfin, please tell me the best way to build an array with progressive buffer readings...

    PS - I need a sample of 10 kHz and a good number of samples filled in a table, or calculations in real time, but I don't know how to do, please help me!

    Thanks in advance

    Hello:

    I discovered the problem... the 128 size is a parameter that can be changed when 'Configuration target - Debug Options' (ADSP-BF537 in my case)!

    Thank you

  • Can make the size of the log buffer be changed or is managed internally by oracle

    Can again change the log buffer size? or is managed internally by oracle in the SGA? We are on oracle 10.2.0.3.

    The reason why I asked the question was that our construction team do estimates for data/memory sizing properly... so we wanted to know if it can be changed or not?

    Hi S2k!

    The SGA Memorystructure is handled automatically by Oracle, if the SGA_TARGET initializationparameter is set. But nothing less you are able to configure the size of a memorystructure by yourself. Here is a good article on the optimization of the log buffer.

    [http://www.dba-oracle.com/t_log_buffer_optimal_size.htm]

    I hope this will help you along.

    Yours sincerely

    Florian W.

  • the buffer size of DBA public has already reached the maximum size of 1703936.

    This error shows up in the journal of my 12 c database alerts.

    I guess it must be linked to some hidden settings.

    _bct_public_dba_buffer_size0total size of all dba buffers, in bytes, of the public change tracking
    _bct_initial_private_dba_buffer_size0initial number of entries in the private sector s/n change tracking buffer
    _bct_public_dba_buffer_dynresize2allow dynamic resizing of the stamps public s/n, zero to disable
    _bct_public_dba_buffer_maxsize0the maximum buffer size allowed for stamps public s/n, in bytes

    But when I check, it seems to be ZERO.

    Not sure where are from 1703936 value?

    Smit

    figured it's not default side effect the LOG_BUFFER parameter.

    Smit

  • Increase the length of size and recorder circular buffer

    Hello again!

    First of all:

    I have a problem with the circular buffer.

    I was able with a sampling frequency of 1000 Hz I used 6 circular buffers, each with a size of buffer for 30 minutes. It was no problem for the PC. I do not have such a high sampling rate, but I need a buffer size that is larger, something between 90 and 120 minutes with 8 pads. so I decided to reduce the sampling rate of what I need, it's 50 Hz. Because I reduced the sampling rate to 1/20 of the original sampling frequency I thought that a buffer size of 120 minutes should be possible.

    Now, after trying the new sampling rate, I still can't use the 8 pads with more than 60 minutes. Any ideas why I had this problem? How can I provide a larger buffer, no possibility?

    Second:

    I use the recorder for display. I would like to display voltage in the long term. With the recorder the maximum length is approximately 3.5 hours. How can I view on longer periods? What I need to display the length in days. Is this possible? Perhaps with the other modules or almost?

    That's it for now, thank you a lot for the useful tips.

    Good day!

    Good bye

    The maximum time width of the graphic recorder or Y/t diagram is a function of memory (RAM) on the computer, the number of channels to display and the sampling frequency. Dynamically, the memory is allocated to the maximum. To avoid using RAM available on the computer, DASYLab is limited to half of the memory of the computer.

    That being said... How you appear more time? You can reduce the number of samples using average or separate modules - in effect, reducing the sampling frequency. Alternatively, you can consider if the trigger on demand and a relay may be able to effectively reduce the samples for data to slow evolution.

    Some clients have two screens high resolution on a shorter and more low resolution over a longer period.

  • buffer size and sync with the cDAQ 9188 problems and Visual Basic

    Hi all, I have a cDAQ-9188 with 9235 for quarter bridge straing caliber acquisition module.

    I would appreciate help to understand how synchronization and buffer.

    I do not use LabView: I'm developing in Visual Basic, Visual Studio 2010.

    I developed my app of the NI AcqStrainSample example. What I found in the order is:

    -CreateStrainGageChannel

    -ConfigureSampleClock

    -create an AnalogMultiChannelReader

    and

    -Start the task

    There is a timer in the VB application, once the task begun, that triggers the playback feature. This function uses:

    -AnalogMultiChannelReader.ReadWaveform (- 1).

    I have no problem with CreateStrainGageChannel, I put 8 channels and other settings.

    Regarding the ConfigureSampleClock, I have some doubts. I want a continuous acquisition, then I put the internal rate, signal source 1000, continuous sample mode, I set the size buffer using the parameter "sampled by channel.

    What I wonder is:

    (1) can I put any kind of buffer size? That the limited hardware of the module (9235) or DAQ (9188)?

    (2) can I read the buffer, let's say, once per second and read all samples stored in it?

    (3) do I have to implement my own buffer for playback of data acquisition, or it is not necessary?

    (4) because I don't want to lose packets: y at - it a timestamp index or a package, I can use to check for this?

    Thank you very much for the help

    Hi Roberto-

    I will address each of your questions:

    (1) can I put any kind of buffer size? That the limited hardware of the module (9235) or DAQ (9188)?

    The samplesPerChannel parameter has different features according to the synchronization mode, you choose.  If you choose finished samples the parameter samplesPerChannel determines how many sample clocks to generate and also determines the exact size to use.  But if you use streaming samples, the samplesPerChannel and speed settings are used together to determine the size of the buffer, according to this excerpt from the reference help C DAQmx:

    Note that this buffer is a buffer software host-side.  There can be no impact on the material available on the cDAQ-9188 or NI 9235 buffers.  These devices each have relatively small equipment pads and their firmware and the Driver NOR-DAQmx driver software transfer data device to automatically host and the most effective way possible.  The buffer on the host side then holds the data until you call DAQmx Read or otherwise the input stream of service.

    (2) can I read the buffer, let's say, once per second and read all samples stored in it?

    Yes.  You would achieve this by choosing a DAQmx Read size equal to the inverse of the sampling frequency (during 1 second data) or a multiple of that of the other playback times.

    (3) do I have to implement my own buffer for playback of data acquisition, or it is not necessary?

    No, you should not need to implement your own stamp.  The DAQmx buffer on the host side will contain the data until you call the DAQmx Read function.  If you want to read from this buffer less frequently you should consider increasing its size to avoid the overflow of this buffer.  Which brings me to your next question...

    (4) because I don't want to lose packets: y at - it a timestamp index or a package, I can use to check for this?

    DAQmx will meet you if all packets are lost.  The default behavior is to stop the flow of data and present an error if the buffer of the side host DAQmx overflows (if, for example, your application does not pick up samples of this buffer at a rate equal or faster than they are acquired, on average).

    If, for any reason, you want to let DAQmx to ignore the conditions of saturation (perhaps, for example, if you want to sample continuously at a high rate but want only interested in retrieving the most recent subset of samples), you can use the DAQmxSetReadOverWrite property and set it to DAQmx_Val_OverwriteUnreadSamps.

    I hope this helps.

  • size of the output buffer

    I update an old VI (LV7.1) which produces a waveform that can be modified by the user in the amplitude and time using DAQ traditional. I used Config.vi to buffer AO (traditional DAQ) to force the buffer to be the same length that the waveform asked so there is no point of excess data that fill all extra buffer space or the required wave form has not been truncated by a short buffer. If I want to perform this action in DAQmx, is there a DAQmx VI to do this, or should I just use the traditional buffer Config.vi AO? Thanks to a highly esteemed experts for any direction I take to do this.

    Hi released,

    You can explicitly set the buffer using the DAQmx Configure output Buffer.vi.  Alternatively, you can leave DAQmx automatically configures your buffer based on the amount of data that you write before you begin the task.  You cannot mix and match functions DAQmx and traditional DAQ on the same device, so using the traditional buffer Config.vi AO is not an option if you want to use DAQmx on your Board.

    Here's a screenshot of the DAQmx help that explains how the size of the buffer is determined by DAQmx:

    I hope this helps!

    Best regards

    John

  • How do to the size of the log buffer reduce with huge Pages Linux

    Data sheet:

    Database: Oracle Standard Edition 11.2.0.4

    OS: Oracle Linux 6.5

    Processor: AMD Opteron

    Sockets: 2

    Carrots / power outlet: 16

    MEM: 252 GB

    Current SGA: GB 122 automatic shared memory (EAMA) management

    Special configuration: Linux huge Pages for 190 GB of memory with the page size of 2 MB.

    Special configuration II: The use of the LUKS encryption to all drives.

    Question:

    1. How can I reduce the size of the log buffer? Currently, it appears that 208 MB. I tried to use log_buffer, and it does not change a thing. I checked the granule size is 256 MB with the current size of the SGA.

    Reason to reduce:

    With the largest size of log buffer the file parallel write newspaper and the synchronization log file is averaged over 45 ms most of the time because she has dumped a lot of stuff at the same time.

    Post edited by: CsharpBsharp

    You have 32 processors and 252 GB of memory, so 168 private discussions, so 45 MB as the public threads size is not excessive.  My example came from a machine running Oracle 32-bit (as indicated by the size of 64 KB of threads private relative to the size of 128 KB of your son) private with (I think) 4 GB of RAM and 2 CPUs - so a much smaller scale.

    Your instance was almost inactive in the meantime so I'd probably look outside the Oracle - but verification of the OS Stats may be informative (is something outside the Oracle using a lot of CPU) and I would like to ask you a few questions about encrypted filesystems (LUKS).  It is always possible that there is an accounting error - I remember a version of Oracle who report sometimes in milliseconds while claiming to centisecondes - so I'll try to find a way to validate the log file parallel write time.

    Check the forum for any stats activity all over again (there are many in your version)

    Check the histogram to wait for additional log file writes event (and journal of file synchronization - the lack of EPA top 5 looks odd given the appearance of the LFPW and and the number of transactions and redo generated.)

    Check the log file to track writer for reports of slow writes

    Try to create a controlled test that might show whether or not write reported time is to trust (if you can safely repeat the same operation with extended follow-up enabled for the author of newspaper which would be a very good test of 30 minutes).

    My first impression (which would of course be carefully check) is that the numbers should not be approved.

    Concerning

    Jonathan Lewis

  • VMWare View 3.1.2: exceeds the limit of size of 65536 negotiated reception buffer

    Hi all.

    I have a problem with my display configuration.

    When I tried to create an automated pool of 40 workstations, using View Composer, creative process stopped after the 37th machine. In the 'event' of the administrator view tab, I noticed following errors:

    Message:

    Context has no test - closing: the negotiated receive size limit buffer 70705exceeds: 65536

    Type:

    Warn

    Time:

    08.10.09 16:51:32

    Module:

    LdapContextManager

    Thread:

    DesktopControlLdap

    and

    Message:

    Unexpected

    error in LDAP reader: javax.naming.ServiceUnavailableException:

    localhost: 389; socket closed; remaining name ' OU = servers

    com VMware.VDI.de

    Type:

    Warn

    Time:

    08.10.09 16:51:27

    Module:

    DesktopTracker

    Thread:

    DesktopControlLdap

    Additional details:

    An unexpected error in LDAP reader: javax.naming.ServiceUnavailableException: localhost: 389; socket closed; remaining name ' OU = com.vmware.vdi.desktoptracker.DesktopTracker.b(SourceFile:106) servers

    javax.naming.ServiceUnavailableException: localhost: 389; socket closed; remaining name ' OU = servers

    at com.sun.jndi.ldap.Connection.readReply (unknown Source)

    at com.sun.jndi.ldap.LdapClient.getSearchReply (unknown Source)

    at com.sun.jndi.ldap.LdapClient.search (unknown Source)

    at com.sun.jndi.ldap.LdapCtx.doSearch (unknown Source)

    at com.sun.jndi.ldap.LdapCtx.searchAux (unknown Source)

    at com.sun.jndi.ldap.LdapCtx.c_search (unknown Source)

    at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search (unknown Source)

    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search (unknown Source)

    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search (unknown Source)

    at javax.naming.directory.InitialDirContext.search (unknown Source)

    to com.vmware.vdi.ldapcontextpool.LdapContextManager$ PooledLdapContext.search (SourceFile:961)

    at com.vmware.vdi.desktoptracker.DesktopTracker.b(SourceFile:106)

    at com.vmware.vdi.desktoptracker.l.run(SourceFile:592)

    at java.lang.Thread.run (unknown Source)

    You have any ideas what it can be?

    VMware View 3.1.2 build-188088

    VMware View Center version 2.5.0 build 174768

    Cluster of servers ESX 4 ESXi 3.5.0 and 184236

    I've seen something like this before, but only when testing against the release of Windows 2008R2 next (which is not currently supported). Please could you give more details about your server and configuration operating system?

  • UDP receive default buffer size

    Hello

    I have a question about receiving data via UDP:

    Description of the problem:

    An application of part 3 is extract to a PACS + 2400 Hz measurement data.

    All samples are then sent to a UDP port locally.

    I then use a labview application to read the data and perform a treatment.

    The question is, at 2400 Hz I loose a lot of UDP packets because of receive buffer overflow, i.e. new data appear before all the old data is read.

    It's BI data ' in irregular bursts, 10 - 20 times every second.

    I tried increasying the Protocol UDP receive buffer according to this size:

    http://digital.NI.com/public.nsf/allkb/D5AC7E8AE545322D8625730100604F2D

    And it seems to fix the problem.

    But here is another question:

    If I change the size of the UDP buffer during execution of the application of the 3rd part, the 3rd team application will crash.

    So my question is:

    Is it possible to change the value default UDP receive buffer size in windows?

    Such that when the UDP connection is open, it will have a buffer size of 32768 for example, regardless of which application that accesses the UDP connection first?

    Y at - he got another code inside your task of reading as a ms of waiting? Is the task of reading as lean and mean as possible? When you increase the size of the buffer?

    I found this registry key. It may be worth a try. The post was old, it cannot apply to Win7.

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Afd\Parameters \DefaultReceiveWindow (REG_DWORD) = 16384 (decimal)

  • use of the cache buffer by schema

    Hello world

    We have 3 application on the same PB, each using its own scheme.

    The sga_target was size to 10 GB and buffer cache is 9 GB (querying V$ SGASTAT).

    We need to know the 'quantity' of the buffer cache that each application uses.

    Is it possible to do?

    Thanks in advance

    Refer to the documentation:
    [url http://docs.oracle.com/cd/E11882_01/server.112/e16638/memory.htm#autoId27] Determine which segments have many buffers in the pool

  • Where is iTunes (12.4) "continuous buffer size?

    You want to find a lot of examples, even some here on apple.com, for older versions. These explain the options 'size of the streaming buffer' can be found in "iTunes > Preferences [Advanced]". " I don't see this in iTunes 12.4. I am listening to a stream of events, but he continues to stamp and finally _turning ignore. And when I press play again, it reconnects immediately.

    Where is iTunes (12.4) "continuous buffer size?

    11 buffer size settings iTunes.

  • Why firefox 15 displays the hex of size for the html data that make up the page?

    Windows 7, 32-bit
    Firefox 15.0.1 update Friday
    Java 1.7.0_07 Friday update

    Management forced a Java Update and restart on Friday. When Firefox started it auto-updated V15.0.1. He had problems immediately; the previous session tabs disappeared all and any page with Flash no longer worked (everything was OK before the two updates).

    In the recommendations, I created a new profile, copy only on bookmarks and files with name of user/authentication of the previous profile. When manually reopen the necessary tabs, pointed out that any Sonicwall firewall and Panasonic Netcam both display only a blank page with one or more hexadecimal numbers on it.

    Efforts to repair since included completely remove Firefox, the plugin Flash and current Java to run in safe mode, disabling all extensions/plugins, running in a completely default new profile with nothing carried over, try with and without hardware acceleration, etc. The behavior does not change. It does not matter if I go via http or https for devices that support both.

    JavaScript IS enabled, and the script _no_ blocking is in place; JavaScript works on other sites that use it.

    IE9 on the same PC works fine, so it's apparently not a system problem

    Looking at the page source shows that hexadecimal numbers are the length of the data in the row or the piece of HTML code, including the following javascript code. The Sonicwall sets up a larger number (2ea) on the line of the display source page that corresponds to the size in bytes of the code in the following lines.

    The Panasonic apparently sends the length of the data in each row if it provides a hexadecimal number for each line of HTML in the source display.

    What would make Firefox interpret the data incoming size as displayed, but only for certain pages or peripheral? I can visit other sites that have javascript and they work; a source of these pages view shows all the lines with just a hexadecimal number.

    view source example of Sonicwall (between the = lines); everything you see on the screen is the "2ea" in the upper left corner

    =

    2ea
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    	<meta name="SonicWALL Administrator" content="Copyright 2004 (c) SonicWALL, Inc. All rights reserved.">
    	<title>SonicWALL - Authentication</title>
    	<meta name="id" content="auth" >
    	<script type="text/JavaScript">
    	<!--
    	top.location.target="_top";
    	if (window.location.target != "_top") {
    		top.location.href=window.location.href;
    	}
    	var savedPwd = "";
    	function onPageUnload() {
    		window.name = "";
    	}
    	window.onunload=onPageUnload;
    	// -->
    	</script>
    </head>
    <frameset rows="*,1">
    	<frame src="auth1.html" name="authFrm" noresize scrolling="no">
    	<frame src="emptyView4.html" name="authTgtFrm" noresize scrolling="no">
    </frameset>
    </html>
    =====
    
    View source sample from the Panasonic; the blank lines are displayed as such in the view source screen.  All you see in the browser window is the series of hex numbers separated by a space on the same line.
    
    =====
    0
    
    3b
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">
    
    8
    <HTML>
    
    7
    <HEAD>
    
    28
    <META HTTP-EQUIV="expires" CONTENT="0">
    
    2e
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    
    35
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
    
    24
    <META NAME="robots" CONTENT="none">
    
    30
    <META NAME="robots" CONTENT="noindex,nofollow">
    
    29
    <META NAME="robots" CONTENT="noarchive">
    
    15
    <TITLE>Start</TITLE>
    
    8
    </HEAD>
    
    3d
    <FRAMESET border=0 frameSpacing=0 rows=30,8,* frameBorder=0>
    
    4c
    <FRAME name=bar src="CgiTagMenu?page=Top&Language=0" scrolling=no NORESIZE>
    
    3c
    <FRAME name=hrbar src="BarFoot.html" scrolling=no NORESIZE>
    
    27
    <FRAME name=body src="Top?Language=0">
    
    c
    </FRAMESET>
    
    9
    </HTML>
    =====
    

    Try to start the computer in safe mode Windows with network support (on the startup screen, press F8) as a test to see if it works better.

  • How to structure the DMA buffer for SMU 6341 DAQ card for analog output with different frequencies on each channel

    I use the outgoing/incoming analog DDK with the DAQ 6341 SMU map.

    The examples, for example aoex5, show a single timer (method outTimerHelper::loadUI), but the example shows the DMA loaded with same size of vector data.

    There is a comment in the outTimerHelper:call rogramUpdateCount, which implies that memory sizes different pad per channel can be used.

    (the comment is: switching between the sizes of the various buffers is not used)

    Nobody knows what should be the format the DMA buffer for data from multiple channels with different frequencies?

    For example, we want a0 with a sinusoid at 1 kHz and a1 with a sine wave of 1.5 Khz.  What looks like the DMA buffer?

    With the same frequency for each channel, the data are interleaved, for example (ao0 #0, ao1 #0; ao0 ao1 #1, #1,...), but when the frequencies for each channel is different, what the stamp looks like?

    Hello Kenstern,

    Data are always intertwined since each card has only a single timing for each subsystem engine.

    To AO, you must specify the number of samples that will be released to the AO. You also specify the number of channels. Because he didn't is that a single engine timing for AO, each AO will be channel will be updated at the same time to update clock tick. Data will be interlaced exactly as shown in the example because each channel AO needs output at each tick of the clock to update. The data itself can change depending on the frequency you want to copy.

    kenstern wrote:

    For example, we want a0 with a sinusoid at 1 kHz and a1 with a sine wave of 1.5 Khz.  What looks like the DMA buffer?

    With the same frequency for each channel, the data are interleaved, for example (ao0 #0, ao1 #0; ao0 ao1 #1, #1,...), but when the frequencies for each channel is different, what the stamp looks like?

    In your example, you must come with an update rate that works for the two waveforms (sine waves of 1 and 1.5 KHz). To get a good representation of a sine wave, you need to update more than 10 x faster than your fastest frequency... I would recommend x 100 if possible.

    Update frequency: 150 KHz

    Channels: 2

    Then create you stamps that include complete cycles of each wave you want to produce based on the frequency of update. These buffers must also be of the same size.

    Buffer 1: Contains data for the sine wave of 1 KHz, 300 points 2 cycles of sine wave

    Buffer 2: Contains data for the sine wave of 1.5 KHz, 300 points, 3 cycles of sine wave

    You can Interleave them as before. When the data are performed through the ADC, they are out different sine waves, even if the AO channels are updated at the same speed.

Maybe you are looking for