Send a large file

I need to send a large file: 130MB to a postgresql server and I get the message of Exception in thread "AWT-EventQueue-0" means: Java heap space
I increased the memory of project with thise options: - Xms600m-Xmx1024m - XX: MaxHeapSize = 1024 m but it is not enough.
Why, if the file is 130 MB and the memory of java is 1024MB memory is not enough?
Measure the java memory in bites and I need 130 * 8 = 1040 Mbites to send this file?
I can do this with much less memory?
Is there a 'standard' to this problem solution?
try {
   gdb.exec("INSERT INTO testxml VALUES(1, '"+
           new String(FileUtils.readFileToByteArray(new File("Nom.xml")), "UTF-8")
           +"')");
} catch (IOException ex) {
    Logger.getLogger(main_class.class.getName()).log(Level.SEVERE, null, ex);
}

Read the entire file into memory just wastes time and space.

byte[] buffer = new byte[8192]; // or more
int count;
while ((count = in.read(buffer)) > 0)
{
  out.write(buffer, 0, count);
}

Tags: Java

Similar Questions

  • When I send a large file, it repeats (sends) again and again until I delete it from the Outbox, it is a virus, a problem of microsoft or roadrunner?

    When I send a large file, it repeats (sends) again and again until I delete it from the Outbox, it is a virus, a problem of microsoft or roadrunner?

    Hi thxfour,

    Got your problem about sending large files by e-mail.
    If I'm just guessing you use a such as MS Outlook or Outlook Express e-mail client!
    If Yes, then,.
    I inform you that the as soon as you click on the button to send your e-mail client. The content of this particular mail sending process begins. The process continues until the last byte of data is transferred. Now, email clients (almost all) are designed to send the contents of a mail only once and not resumeable parts. Now, each time while you send mail with the content inside, it must go in one piece. However, if there is some sort of interruption in the internet connection, the content is not completely transferred. The remains of mail in the Outbox and automatically transfer begins as soon as the internet connection resumes. When the mail is deleted from the Outbox send is stopped because the source is no longer available.

    This thing happens generally when sending large files on a slow speed or internet medium given that the execution time is more emails compared to normal.
    Run time means more chances to get an interruption in internet connectivity.

    * It is advisable to use an application to transfer files to transfer large files over the internet instead of emails. File transfer can transfer large files (in GB), and if there is no interruption in the internet connection, you can resume the download.

    Best regards

  • Can I send a large file of large JPEG files?

    Can I send a large file of large JPEG files? (Do not see this in two types of files included or excluded). I have several folders containing groups 20 MB jpegs. If I can meet you. Thank you

    You can zip to the top of each file and send the zip file.

    For now, it is not possible to select and send entire folders. You will need to select the files in each folder.

  • How to send a large file attachment using iCloud mail

    I try to send an email with an attachment. The file size is 29.8 and message indicates the size of the file is greater than the limit of 28.5.  I can't find the mailbox. How can I find box mailbox?  Is there anything else I can do?

    Are you connect to your iCloud account, when you try to send the attachment of t? So little should be automatic:

    Send large attachments by using the mailbox

    You can use the mailbox to send files that exceed the maximum size allowed by your ISP email account . Mailbox post large attachments to iCloud, where they are encrypted and stored for 30 days.

    • If you have an iCloud account and you're connected to iCloud when you click on send, mail will automatically send the attachments using the mailbox. Mail attachments do not count against your storage iCloud.
    • If you have not an iCloud account, or if you are not connected, Mail asking you if you want to use the mailbox (always use send, select "no longer request for this account").

    If a recipient using Mail in OS X Yosemite or later, attachments are included with your message. For the other beneficiaries, your message includes links to download attachments and their expiry date.

    You can activate the mailbox or disable an account. Choose Mail > Preferences, click accounts, select the account, click Advanced, and then select or deselect the option "send large attachments with box.

  • I tried to send a large file to myself and he stopped all my emails to enter.

    I'm no longer receive emails, since I tried to send a few photos from my phone to my email. I can always send e-mail, but nothing comes back.

    Mail is downloaded strictly in the order it is received for a long time for the message download or log into the webmail of your provider and delete the message to clear the download list so other mail can download allow, either.

  • Problem sending large file with photo attachments

    • I tried to send a large file with Vista photo attachments.  It fails whenever he tries, so I'd just delete the email because I can not send or receive any other emails.  I deleted the file from my Outbox, but he's trying to send it whenever I log in. where should I go with that.  Thank you.

    http://www.Vistax64.com/tutorials/62560-Windows-Mail-problems.html

    Read through the info on the link above.

    And your ISP (Internet ServiceProvider) probably has limits on the size of files that you can send.

    See you soon.

    Mick Murphy - Microsoft partner

  • Send large files

    What is the name of the program to send large files (or rather for their recovery.)

    Use the mailbox, see this support document: limits of mailbox - Apple Support

    https://support.Apple.com/en-us/HT203093

    iCloud: Add an attachment to an e-mail https://support.Apple.com/kb/PH2629?locale=en_US 

  • trying to send a large audio file

    How to send a large audio file by e-mail. Message says error cannot send it's big.

    What is the size of the file and who is your mail server. They all have limits, and if you talk about 10 MB +, not many people would want to receive even if you could send it. You can used a third-party Web site to do this. These are only two of many.

    Download large files. An alternative to e-mail.

    YouSendIt:
    www.YouSendIt.com

    SendThisFile:
    www.SendThisFile.com

  • How to send a large Windows Media file - the file is 93.5 MB size. Tried to use winzip but zipped file size bed still 93.5 MB which is too large to send via my gmail account.

    How to send a large Windows Media file - the file is 93.5 MB size.  Tried to use winzip but him zipped file size bed still 93.5 MB which is too large to send via my hotmail account.

    The max on most email providers is 10 MB. The only way that you could share this file would find a download site that allows to host this file. You can do a search for hosting sites and find one that goes on your needs. Once you download the file to the single copy of the site the link and give the person who you want to initially by email.

  • Can I receive large files with Adobe send?

    Is Adobe send that it is possible to receive large files?

    The incoming address can be all that one is better than you (just inform the sender). When you receive a shipment email, it simply includes a link to the file sent. In this way, we don't work against any restriction of file size that your e-mail client may impose.

    Best,

    Sara

  • MainStage 3 - sends the Midi file

    Hello.

    Someone at - it service send a Midi file in MainStage 3 to work?

    The synth gets midi when I play the midi keyboard.

    I tried to press the play button in MainStage before changing the patch that is supposed to send the midi file.

    I tried to download various midi files.

    I know I'm getting a midi SMF of the file, but don't know where to check if they are of type 0 or 1.

    The manual States the following:

    Send a MIDI file using an external instrument

    1. In the external Instrument channel strip Inspector, click the output tab MIDI.
    2. Check send a MIDI file, and then click the Select button.
    3. Choose the location of the MIDI file you want to add, select the file, and then click the file Send.The MIDI is sent immediately to the port selected on the external instrument Channel Strip. The MIDI file is returned when you change patches, just as the other options of the Inspector of channel strip (such as program change messages or the MIDI clock).

    Only types SMF (standard MIDI file) 0 and 1 are supported. MIDI files are sent in the order, the institution after another, per concert. If you pass quickly through several patches which send long queues of MIDI, MIDI files are queued and sent in succession. MIDI messages are sent to the tempo stored in the MIDI file.

    It is a complicated issue, but I solved with a workaround.  My file "noon" is a set of commands for controlling an external light strip (DMXIS) in sync with a backing track.   The native functionality of MainStage has not worked for me.  The solution was a plugin called thingy by plug.   The plug-in includes a large number of configurable widgets, including in particular a "midi file player."  This widget can be set up in the contraption that runs in the Instrument channel strip plug-in.   The configuration is complicated, but I can walk you through it, if you are interested.   The software thingy is about $ 100, but there is a period long demo if you want to try it.

    I would like to know if you want help setting up; the plugin task processor and memory, especially if you plan to run multiple instances.   But it works.

    David

  • How to configure FolderLink to send a large attachment?

    I am trying to send a large attachment with Thunderbird using FolderLink.
    First of all, I have to set up an account to FolderLink.
    The first step in the instructions for the configuration of FolderLink says:

    "At the top of the Firefox window, click on the Firefox button and Options

    Click on the Fx Menu new menu button and choose the Options"

    With Firefox open, I click Firefox logo at the top left, but this apparently is not the Firefox button, because there is no option to Options. Where is the Firefox button?
    The Menu button then? If not, where is the Menu button?
    Or y at - it another way to set up an account to FolderLink?

    Nope, that works properly. I was obviously wrong the last time.

    Direct links can be good for images, but if your sending someone a video or a large CAD file it would be the height in frustrating if the file has tried to open a direct link application.

  • How to download a large file using 4 G

    Whenever I have try and download a larger file on YouTube on wifi phone stops me and says that I need wifi to do this. It allows me to do using 4 G. How can I get to enable this?

    I had the problem to sending a video by selecting youtube my Gallery but after I downloaded a video using the youtube app, I am now able to download on youtube of the gallery. Thanks for your help.

  • scanning - too large files!

    I have a HP OfficeJet J6480 All In One - when I scan a text of the document in PDF format, the file size is huge - a single page is at least 600Kb to 150 dpi - which makes for too large files to send, if you analyze 10 more pages. Is there a setting to change in order to reduce the file size while leaving the easily readable scan? Thank you

    If you use HP's Center version 10, download a version of the photosmart c6380 12 software. Advanced installation to select custom settings. Check the box for the imagery of function of the device and the HP Solution Center, and then uncheck the rest. Select the type of USB connection. in the lower left corner, you will see a box that says "If you cannot connect the device...". Plug the device later... ', check this box.

    MOD edit: also, here is a link to another post of Nickyton81 with installation instructions:

    http://h30434.www3.HP.com/PSG/board/message?board.ID=scan&message.ID=2307#M2307

    Message edited by Wendy on 27/04/2009 12:12
  • Outlook Express to receive e-mail large file for 3 days of work

    Someone sent me an email with a very large file (about 20 MB) and OE tried to receive this message for 3 days with no progress.  I can't send or receive any other emails until it has been received, or better still, deleted.  Help!

    Just to add to the good advice of Brian, there is another thing you can do.

    Create a Message rule:

    Where the message size is size
    Delete server
    Click on size and place it for about 10 MB, and then click: Apply Now.

    Return to the Inbox, and then click send/receive. This should get rid of the message.

    Don't forget to go back to the rules of Message and either delete the rule, or uncheck it if you use it in the future.

    Bruce Hagen ~ MS - MVP [Mail]

Maybe you are looking for

  • How can I change the SMTP server to any server I want to?

    This is a common situation, and I have seen many others ask a similar question. It is a simple question, but Thunderbird does not seem to allow it. In my case, I have a choice of two mail server outgoing. I can use my hosting company Godaddy or my In

  • HP Support Assistant stops working after the update

    message says: hpsf.exe has stopped working HP ENVY 17-2070nr PC windows 7 64 bit laptop

  • Computer without recognising new Clip +.

    I read through the archives, and nothing seems to work. Under Vista 64, WM11. I tried the USB setting both MTP and MSC mode. Firmware is 01.01.05 (impossible to pass firmware until I can plug the clamp. I tried to connect it to a Windows 7 computer,

  • Discrepancy between the members of the battery

    I have two PC 6448 switches, I would like to buy stackable modules and create mismatches like this:CH1: ports 1/g1, g1/2CH2: ports 1/g2, g2/2and so on... Is this possible? I asked the local dell support and they said that they are not some about that

  • Email address is not recognized.

    Original title: * e-mail address is removed from the privacy *. I used this email address for years now I no longer use Outlook. I use FB, Google +, no matter what, all of a sudden this e-mail address is no longer recognized. I can't go back to more