본문 바로가기
반응형

InputStreamReader4

[Java] 간단한 파일 쓰기, 읽기 (File, FileOutputStream, FileInputStream, BufferedReader, InputStreamReader) package com.example.test; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStreamReader; public class FileInputOutputTest { public static void main(String[] args) throws IOException { File f = new File("./src/com/example/test/new_file.txt"); FileOutputStream fos = new FileOutputStr.. 2022. 10. 30.
[Java] 간단한 채팅 소켓통신 (Thread, Runnable, BufferedReader, BufferedWriter, InputStreamReader, OutputStreamWriter, Socket, ServerSocket) 간단한 채팅 소켓통신 chattingclient project chattingserver project 워크스페이스 하나에 두개의 프로젝트 또는 두 개의 워크스페이스에 각 한개씩의 프로젝트를 생성 chattingclient project ChattingClient.java package chattingclient; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.net.Socket; import java.util.Scanner; class Receiv.. 2022. 10. 23.
[JAVA] URL 코드보기 package book.chap15; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.net.URL; import java.net.URLConnection; public class ViewURL { public ViewURL() {} public ViewURL(String strURL) { URL myURL = null; URLConnection urlCon = null; InputStream is = null; BufferedReader br = null; String data = null; String headerType = null; try { myURL = n.. 2020. 3. 18.
[JAVA]StreamReader , BufferedReader package book.chap15; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Random; import javax.swing.JFrame; import javax.swing.JOptionPane; public class RandomGame extends JFrame{ public static void main(String[] args) { RandomGame rg = new RandomGame(); Random r = new Random(); int dap = r.nextInt(10); String user = "-1"; JOptionPane.showMessageDialog(rg, "0부터 9주에서.. 2020. 3. 18.
반응형