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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:08:41+00:00 2026-06-06T04:08:41+00:00

I get no errors but my code is not saving any new data to

  • 0

I get no errors but my code is not saving any new data to the text file, here is my code:

public void saveToLeaderboard() throws IOException {
        String toSave = "Random info I want to save";
        HttpConnection connection = null;

        connection = (HttpConnection) Connector.open("EXTERNAL URL", Connector.READ_WRITE, true);
        connection.setRequestMethod(HttpConnection.POST);

        DataOutputStream out = new DataOutputStream(connection.openDataOutputStream());
        out.writeUTF(toSave);        

        out.flush();
        connection.close();
    }

What am I doing wrong?

  • 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-06T04:08:43+00:00Added an answer on June 6, 2026 at 4:08 am

    My own solution at the end of the day :

    I created a server side file (in my case it was a .Net file [.aspx]), I set my external url to call my .Net page with url variables that holds my data needed.

    And did a basic save to txt file with server code (in my case C#).

    public void saveToLeaderboard() throws IOException {
            String toSave = "Data to save";
            InputStream inputStream = null;
            HttpConnection connection = (HttpConnection) Connector.open("External Url" + "?info=" + toSave, Connector.READ_WRITE, true);
            connection.setRequestMethod(HttpConnection.POST);
            inputStream = connection.openInputStream();
            inputStream.close();
            connection.close();
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Code is as follows but I get a ytplayer is not defined error. Is
I don't get any errors, but when i click submit nothing happens. Just wanted
I want to create a new DbCommand, but get some errors: DbCommand insertcommand =
I am using following PHP code for trigger creation but always get error, please
I have this code, but i can't understand why i get this error: a=
I'm trying to run the following code, but get an error in the gameLoop
I have the following View, Controller and Comment.cs code, but I get an error,
Magento 1.4.2 Having compilation errors and the page doesn't render. I get errors but
I'm trying to do multithread uploads, but get errors. I guessed that maybe it's
I want to do the following,but I get errors: procedure JumpToCodeCave(CurrentLocation:DWORD;Destination:Pointer;out_JmpBack:Pointer); var calc:DWORD; jmppatch:Array[0..3]

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.