|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.electric.tool.io.input.Input
public class Input
This class manages reading files in different formats. The class is subclassed by the different file readers.
Field Summary | |
---|---|
protected long |
byteCount
the number of bytes of data read so far |
protected java.io.DataInputStream |
dataInputStream
The input stream. |
static ErrorLogger |
errorLogger
Log errors. |
protected long |
fileLength
The length of the file. |
protected java.lang.String |
filePath
Name of the file being input. |
protected java.io.InputStream |
inputStream
The raw input stream. |
protected java.io.LineNumberReader |
lineReader
The line number reader (text only). |
protected static int |
READ_BUFFER_SIZE
|
Constructor Summary | |
---|---|
Input()
|
Method Summary | |
---|---|
static boolean |
changesQuiet(boolean quiet)
Method to set the subsequent changes to be "quiet". |
protected void |
closeInput()
|
protected boolean |
eofDuring(java.lang.String when)
Method to display an error message because end-of-file was reached. |
protected java.lang.String |
getAKeyword()
|
protected java.lang.String |
getLine()
Method to read the next line of text from a file. |
protected java.lang.String |
getLineFromBinary()
Method to read a line of text, when the file has been opened in binary mode. |
protected static java.lang.String |
getProgressNote()
|
protected java.lang.String |
getRestOfLine()
Method to allow getAKeyword() to read next line next time is invocated. |
protected Library |
importALibrary(Library lib)
Method to import a library from disk. |
static Library |
importLibrary(java.net.URL fileURL,
FileType type)
Method to import a Library from disk. |
static Library |
importToCurrentLibrary(java.net.URL fileURL,
FileType type)
|
protected void |
initKeywordParsing()
|
protected boolean |
isBreakCharacter(char chr)
Helper method for keyword processing which decides whether a character is its own keyword. |
static boolean |
isChangeQuiet()
Method to tell whether changes are being made quietly. |
static boolean |
isNewLibraryCreated()
Method to tell if a new library was created for this import operation. |
protected boolean |
openBinaryInput(java.net.URL fileURL)
|
protected boolean |
openStringsInput(java.lang.String[] lines)
|
protected boolean |
openTextInput(java.net.URL fileURL)
|
protected java.lang.String |
preprocessLine(java.lang.String line)
Helper method for keyword processing which removes comments. |
protected java.lang.String |
readWholeLine()
|
protected static void |
setProgressNote(java.lang.String msg)
|
protected static void |
setProgressValue(int value)
|
protected static void |
startProgressDialog(java.lang.String type,
java.lang.String filePath)
|
protected static void |
stopProgressDialog()
|
protected void |
updateProgressDialog(int bytesRead)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int READ_BUFFER_SIZE
public static ErrorLogger errorLogger
protected java.lang.String filePath
protected java.io.InputStream inputStream
protected java.io.LineNumberReader lineReader
protected java.io.DataInputStream dataInputStream
protected long fileLength
protected long byteCount
Constructor Detail |
---|
public Input()
Method Detail |
---|
public static boolean isNewLibraryCreated()
public static Library importLibrary(java.net.URL fileURL, FileType type)
fileURL
- the URL to the disk file.type
- the type of library file (CIF, GDS, etc.)
public static Library importToCurrentLibrary(java.net.URL fileURL, FileType type)
protected Library importALibrary(Library lib)
lib
- the library to fill
protected boolean openBinaryInput(java.net.URL fileURL)
protected boolean openStringsInput(java.lang.String[] lines)
protected boolean openTextInput(java.net.URL fileURL)
protected static void setProgressNote(java.lang.String msg)
protected static java.lang.String getProgressNote()
protected static void startProgressDialog(java.lang.String type, java.lang.String filePath)
protected static void stopProgressDialog()
protected static void setProgressValue(int value)
protected void updateProgressDialog(int bytesRead)
protected void closeInput()
protected java.lang.String getLine() throws java.io.IOException
java.io.IOException
protected java.lang.String getLineFromBinary() throws java.io.IOException
java.io.IOException
protected void initKeywordParsing()
protected java.lang.String getRestOfLine() throws java.io.IOException
java.io.IOException
protected java.lang.String readWholeLine() throws java.io.IOException
java.io.IOException
protected java.lang.String getAKeyword() throws java.io.IOException
java.io.IOException
protected boolean isBreakCharacter(char chr)
chr
- the character in question.
protected java.lang.String preprocessLine(java.lang.String line)
line
- a line of text just read.
public static boolean isChangeQuiet()
public static boolean changesQuiet(boolean quiet)
protected boolean eofDuring(java.lang.String when)
when
- the statement being read when EOF was reached.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |