edu.rice.cs.drjava
Class IndentFile

java.lang.Object
  |
  +--edu.rice.cs.drjava.IndentFile

public class IndentFile
extends Object

Allows users to pass filenames to a command-line indenter. The stupid part is that it uses the swing document API. Attempts to run with headless AWT though. $Id: IndentFile.java,v 1.2 2002/07/18 22:05:45 cmcgraw Exp $


Field Summary
private static int BUF_SIZE
           
 
Constructor Summary
IndentFile()
           
 
Method Summary
static void indentFiles(String[] filenames, int indentLevel)
           
private static boolean isHeadless()
          Java versions 1.4 or above should have this implemented.
static void main(String[] args)
           
private static String readFileAsString(String filename, char[] buf)
           
private static void writeFileFromString(String filename, String value)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

BUF_SIZE

private static final int BUF_SIZE
Constructor Detail

IndentFile

public IndentFile()
Method Detail

main

public static void main(String[] args)

indentFiles

public static void indentFiles(String[] filenames,
                               int indentLevel)

readFileAsString

private static String readFileAsString(String filename,
                                       char[] buf)
                                throws IOException

writeFileFromString

private static void writeFileFromString(String filename,
                                        String value)
                                 throws IOException

isHeadless

private static boolean isHeadless()
Java versions 1.4 or above should have this implemented. Return false, if earlier version.