1 package org.simantics.graph.compiler.internal.ltk;
4 import java.io.FileInputStream;
5 import java.io.IOException;
6 import java.io.InputStream;
8 public class FileSource implements ISource {
11 public FileSource(File file) {
15 public FileSource(String fileName) {
16 this.file = new File(fileName);
20 public InputStream open() throws IOException {
21 return new FileInputStream(file);
25 public String getName() {
26 return file.getName();
30 public int length() throws IOException {
31 return (int)file.length();
35 public int startPos() {
40 public int startLine() {