/**
*
*/
package io.java;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
/**
* @author 彦舜
*
*/
public class IOInputOutputStream {
/**
*
*/
public IOInputOutputStream() {
// TODO Auto-generated constructor stub
}
/**
* @param args
* @throws IOException
* @throws Exception
*/
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
/** Test InputStream and OutputStream for IO Byte Stream. */
testIOputStream();
}
/**Test InputStream and OutputStream for IO Byte Stream
* @throws IOException */
@SuppressWarnings("null")
public static void testIOputStream() throws IOException {
/**1.InputStream
Create a instanced InputStream object.
InputStream cannot be resolved to a type
FileInputStream cannot be resolved to a type
--Import 'ClassName' (java.io)
--(Add type parameter 'ClassName' to 'method()')
--Fix project setup......
Unhandled exception type FileNotFoundException
--Add throws declaration
--Surround with try/catch
File cannot be resolved to a type
--Import 'File' (java.io)
FileNotFoundException cannot be resolved to a type
--Import 'FileNotFoundException' (java.io)
IOException cannot be resolved to a type
--Import 'IOExeption' (java.io)
The value of the local variable field is not used
--Remove 'field' and all assignments
--Remove 'field', keep assignments with side effects
----Fix 2 problems of same category in file
--Add @SuppressWarnings 'unused' to 'field'/'method()'
--Configure problem severity配置问题的严重程度/配置问题的严重性
The import java.io.FileNotFoundException is never used
--Remove unused import
--Organize imports
--Add @SuppressWarnings 'unused' to 'ClassName'
--Configure problem severity
The value of the local variable field is not used
--Remove 'field' and all assignments
--Remove 'field', keep assignments with side effects
--Add @SuppressWarnings 'unused' to 'field'/&
彦舜原创,CSDN首发:Input-OutputStream
最新推荐文章于 2022-09-12 13:33:59 发布