• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java IOToolkit类的典型用法和代码示例

java 3次浏览

本文整理汇总了Java中gnu.classpath.tools.IOToolkit的典型用法代码示例。如果您正苦于以下问题:Java IOToolkit类的具体用法?Java IOToolkit怎么用?Java IOToolkit使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

IOToolkit类属于gnu.classpath.tools包,在下文中一共展示了IOToolkit类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: loadFile

点赞 3

import gnu.classpath.tools.IOToolkit; //导入依赖的package包/类
static char[] loadFile(final File file, String encoding)
   throws IOException
{
   InputStream in = new FileInputStream(file);
   NotifyingInputStreamReader notifyingInput
      = new NotifyingInputStreamReader(in, encoding);
   notifyingInput.addMalformedInputListener(new MalformedInputListener() {
         public void malformedInputEncountered(MalformedInputEvent event) {
            Main.getRootDoc().printWarning("Illegal character in file " + file + ", line " + event.getLineNumber() + ", column " + event.getColumnNumber());
            try {
               Main.getRootDoc().printWarning(IOToolkit.getLineFromFile(file, event.getLineNumber()));
               Main.getRootDoc().printWarning(IOToolkit.getColumnDisplayLine(event.getColumnNumber()));
            }
            catch (IOException ignore) {
            }
         }
      });
   Reader reader
      = new BufferedReader(notifyingInput);
   char[] result = IOToolkit.readFully(reader);
   reader.close();
   return result;
}
 

开发者ID:vilie,
项目名称:javify,
代码行数:24,
代码来源:Parser.java

示例2: loadFile

点赞 3

import gnu.classpath.tools.IOToolkit; //导入依赖的package包/类
static char[] loadFile(final File file, String encoding) 
   throws IOException 
{
   InputStream in = new FileInputStream(file);
   NotifyingInputStreamReader notifyingInput
      = new NotifyingInputStreamReader(in, encoding);
   notifyingInput.addMalformedInputListener(new MalformedInputListener() {
         public void malformedInputEncountered(MalformedInputEvent event) {
            Main.getRootDoc().printWarning("Illegal character in file " + file + ", line " + event.getLineNumber() + ", column " + event.getColumnNumber());
            try {
               Main.getRootDoc().printWarning(IOToolkit.getLineFromFile(file, event.getLineNumber()));
               Main.getRootDoc().printWarning(IOToolkit.getColumnDisplayLine(event.getColumnNumber()));
            }
            catch (IOException ignore) {
            }
         }
      });
   Reader reader
      = new BufferedReader(notifyingInput);
   char[] result = IOToolkit.readFully(reader);
   reader.close();
   return result;
}
 

开发者ID:nmldiegues,
项目名称:jvm-stm,
代码行数:24,
代码来源:Parser.java

示例3: copyDocFiles

点赞 2

import gnu.classpath.tools.IOToolkit; //导入依赖的package包/类
protected void copyDocFiles(File sourceDir, File targetDir)
   throws IOException
{
   File sourceDocFiles = new File(sourceDir, "doc-files");
   File targetDocFiles = new File(targetDir, "doc-files");

   if (sourceDocFiles.exists()) {
      IOToolkit.copyDirectory(sourceDocFiles,
                              targetDocFiles,
                              optionDocFilesSubDirs.getValue(),
                              optionExcludeDocFilesSubDir.getComponents());
   }
}
 

开发者ID:vilie,
项目名称:javify,
代码行数:14,
代码来源:AbstractDoclet.java

示例4: insert

点赞 2

import gnu.classpath.tools.IOToolkit; //导入依赖的package包/类
public void insert(Reader in)
   throws IOException
{
   IOToolkit.copyStream(in, out);
}
 

开发者ID:vilie,
项目名称:javify,
代码行数:6,
代码来源:HtmlPage.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)