Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.io.BufferedWriter;
import java.io.IOException;

import java.io.OutputStreamWriter;

import java.net.HttpURLConnection;

public class Main {
    public static void writeParam(HttpURLConnection urlConnection, String param) {
        try {
            BufferedWriter writer = new BufferedWriter(
                    new OutputStreamWriter(urlConnection.getOutputStream(), "UTF-8"));
            writer.write(param);
            writer.flush();
            writer.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}