Here you can find the source of getPrintWriter(Socket s)
public static PrintWriter getPrintWriter(Socket s) throws IOException
//package com.java2s; /**//from ww w .java 2s.c o m * Copyright (c) 2010 B?lint Kriv?n <balint@krivan.hu>. All rights reserved. * Use of this source code is governed by license that can be * found in the LICENSE file. */ import java.io.IOException; import java.io.PrintWriter; import java.net.Socket; public class Main { public static PrintWriter getPrintWriter(Socket s) throws IOException { return new PrintWriter(s.getOutputStream()); } }