Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.io.OutputStream;

public class Main {
    public static void writeSCSocket(OutputStream os, String data) throws Exception {
        writeSCSocketBytes(os, data.getBytes(), data.length());
    }

    public static void writeSCSocketBytes(OutputStream os, byte[] buffer, int len) throws Exception {
        os.write(buffer, 0, len);
        os.flush();
    }
}