Documentation of 'org.hecl.files.HeclFileUtils' Java class
HeclFileUtils
org.hecl.files

Class HeclFileUtils



  • public class HeclFileUtils
    extends java.lang.Object
    The HeclFileUtils class provides several utility functions that are used both by FileCmds, and elsewhere in Hecl.
    • Constructor Summary

      Constructors 
      Constructor and Description
      HeclFileUtils() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static Thing readFile(java.lang.String filename)
      readFile takes a filename and returns the file's contents as a Thing.
      static Thing readFileFromDis(java.io.DataInputStream dis)
      readFileFromDis, given a DataInputStream, reads from the stream until no more can be read, and returns the results as a Thing.
      static void sourceFile(Interp interp, java.lang.String filename)
      The sourceFile method takes a file name.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HeclFileUtils

        public HeclFileUtils()
    • Method Detail

      • readFile

        public static Thing readFile(java.lang.String filename)
                              throws HeclException,
                                     java.io.IOException
        readFile takes a filename and returns the file's contents as a Thing.
        Parameters:
        filename - a String value
        Returns:
        a Thing value
        Throws:
        HeclException - if an error occurs
        java.io.IOException - if an error occurs
      • readFileFromDis

        public static Thing readFileFromDis(java.io.DataInputStream dis)
                                     throws java.io.IOException
        readFileFromDis, given a DataInputStream, reads from the stream until no more can be read, and returns the results as a Thing.
        Parameters:
        dis - a DataInputStream value
        Returns:
        a Thing value
        Throws:
        java.io.IOException - if an error occurs
      • sourceFile

        public static void sourceFile(Interp interp,
                                      java.lang.String filename)
                               throws HeclException
        The sourceFile method takes a file name. It opens that file, reads the contents, and evaluates them with the provided interpreter.
        Parameters:
        interp - an Interp value
        filename - a String value
        Throws:
        HeclException - if an error occurs

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.