CloneSet7


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
401310.991method_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
140234
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/BaseDataTypeComponent.java
236451
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeBoolean.java
340474
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeByte.java
440698
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeClob.java
540628
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeDate.java
640518
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeDouble.java
740520
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeFloat.java
840502
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeInteger.java
940473
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeLong.java
1040474
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeShort.java
1140573
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeTime.java
1240595
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeTimestamp.java
1339537
E:/TSE/Projects-CloneDR/sql12/plugins/derby/src/net/sourceforge/squirrel_sql/plugins/derby/types/DerbyClobDataTypeComponent.java
Next
Last
Clone Instance
1
Line Count
40
Source Line
234
Source File
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/BaseDataTypeComponent.java

/**
 * Read a file and construct a valid object from its contents.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported
 * data can be converted to an object, and then must return
 * a text string that can be used in the Popup window text area.
 * This object-to-text conversion is the same as is done by
 * the DataType object internally in the getJTextArea() method.
 *
 * <P>
 * File is assumed to be and ASCII string of digits
 * representing a value of this data type.
 */
public String importObject(FileInputStream inStream) throws IOException {
  InputStreamReader inReader = new InputStreamReader(inStream);
  int fileSize = inStream.available();
  char charBuf[] = new char[fileSize];
  int count = inReader.read(charBuf, 0, fileSize);
  if (count != fileSize)
    throw new IOException("Could read only " + count + " chars from a total file size of " + fileSize + ". Import failed.");
  // convert file text into a string
  // Special case: some systems tack a newline at the end of
  // the text read.  Assume that if last char is a newline that
  // we want everything else in the line.
  String fileText;
  if (charBuf[count - 1] == KeyEvent.VK_ENTER)
    fileText = new String(charBuf, 0, count - 1);
  else
    fileText = new String(charBuf);
  // test that the string is valid by converting it into an
  // object of this data type
  StringBuffer messageBuffer = new StringBuffer();
  validateAndConvertInPopup(fileText, null, messageBuffer);
  if (messageBuffer.length() > 0) {
    // convert number conversion issue into IO issue for consistancy
    throw new IOException("Text does not represent data of type " + getClassName() + ".  Text was:\n" + fileText);
  }
  // return the text from the file since it does
  // represent a valid data value
  return fileText;
}


Next
Previous
Clone Instance
2
Line Count
36
Source Line
451
Source File
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeBoolean.java

/**
 * Read a file and construct a valid object from its contents. Errors are returned by throwing an
 * IOException containing the cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported data can be converted to an object, and then
 * must return a text string that can be used in the Popup window text area. This object-to-text conversion
 * is the same as is done by the DataType object internally in the getJTextArea() method.
 * <P>
 * File is assumed to be and ASCII string of digits representing a boolean value.
 */
public String importObject(FileInputStream inStream) throws IOException {
  InputStreamReader inReader = new InputStreamReader(inStream);
  int fileSize = inStream.available();
  char charBuf[] = new char[fileSize];
  int count = inReader.read(charBuf, 0, fileSize);
  if (count != fileSize)
    throw new IOException("Could read only " + count + " chars from a total file size of " + fileSize + ". Import failed.");
  // convert file text into a string
  // Special case: some systems tack a newline at the end of
  // the text read. Assume that if last char is a newline that
  // we want everything else in the line.
  String fileText;
  if (charBuf[count - 1] == KeyEvent.VK_ENTER)
    fileText = new String(charBuf, 0, count - 1);
  else
    fileText = new String(charBuf);
  // test that the string is valid by converting it into an
  // object of this data type
  StringBuffer messageBuffer = new StringBuffer();
  validateAndConvertInPopup(fileText, null, messageBuffer);
  if (messageBuffer.length() > 0) {
    // there was an error in the conversion
    throw new IOException("Text does not represent data of type " + getClassName() + ".  Text was:\n" + fileText);
  }
  // return the text from the file since it does
  // represent a valid data value
  return fileText;
}


Next
Previous
Clone Instance
3
Line Count
40
Source Line
474
Source File
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeByte.java

/**
 * Read a file and construct a valid object from its contents.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported
 * data can be converted to an object, and then must return
 * a text string that can be used in the Popup window text area.
 * This object-to-text conversion is the same as is done by
 * the DataType object internally in the getJTextArea() method.
 * 
 * <P>
 * File is assumed to be and ASCII string of digits
 * representing a value of this data type.
 */
public String importObject(FileInputStream inStream) throws IOException {
  InputStreamReader inReader = new InputStreamReader(inStream);
  int fileSize = inStream.available();
  char charBuf[] = new char[fileSize];
  int count = inReader.read(charBuf, 0, fileSize);
  if (count != fileSize)
    throw new IOException("Could read only " + count + " chars from a total file size of " + fileSize + ". Import failed.");
  // convert file text into a string
  // Special case: some systems tack a newline at the end of
  // the text read.  Assume that if last char is a newline that
  // we want everything else in the line.
  String fileText;
  if (charBuf[count - 1] == KeyEvent.VK_ENTER)
    fileText = new String(charBuf, 0, count - 1);
  else
    fileText = new String(charBuf);
  // test that the string is valid by converting it into an
  // object of this data type
  StringBuffer messageBuffer = new StringBuffer();
  validateAndConvertInPopup(fileText, null, messageBuffer);
  if (messageBuffer.length() > 0) {
    // convert number conversion issue into IO issue for consistancy
    throw new IOException("Text does not represent data of type " + getClassName() + ".  Text was:\n" + fileText);
  }
  // return the text from the file since it does
  // represent a valid data value
  return fileText;
}


Next
Previous
Clone Instance
4
Line Count
40
Source Line
698
Source File
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeClob.java

/**
 * Read a file and construct a valid object from its contents.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported
 * data can be converted to an object, and then must return
 * a text string that can be used in the Popup window text area.
 * This object-to-text conversion is the same as is done by
 * the DataType object internally in the getJTextArea() method.
 *
 * <P>
 * File is assumed to be and ASCII string of digits
 * representing a value of this data type.
 */
public String importObject(FileInputStream inStream) throws IOException {
  InputStreamReader inReader = new InputStreamReader(inStream);
  int fileSize = inStream.available();
  char charBuf[] = new char[fileSize];
  int count = inReader.read(charBuf, 0, fileSize);
  if (count != fileSize)
    throw new IOException("Could read only " + count + " chars from a total file size of " + fileSize + ". Import failed.");
  // convert file text into a string
  // Special case: some systems tack a newline at the end of
  // the text read.  Assume that if last char is a newline that
  // we want everything else in the line.
  String fileText;
  if (charBuf[count - 1] == KeyEvent.VK_ENTER)
    fileText = new String(charBuf, 0, count - 1);
  else
    fileText = new String(charBuf);
  // test that the string is valid by converting it into an
  // object of this data type
  StringBuffer messageBuffer = new StringBuffer();
  validateAndConvertInPopup(fileText, null, messageBuffer);
  if (messageBuffer.length() > 0) {
    // convert number conversion issue into IO issue for consistancy
    throw new IOException("Text does not represent data of type " + getClassName() + ".  Text was:\n" + fileText);
  }
  // return the text from the file since it does
  // represent a valid data value
  return fileText;
}


Next
Previous
Clone Instance
5
Line Count
40
Source Line
628
Source File
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeDate.java

/**
 * Read a file and construct a valid object from its contents.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported
 * data can be converted to an object, and then must return
 * a text string that can be used in the Popup window text area.
 * This object-to-text conversion is the same as is done by
 * the DataType object internally in the getJTextArea() method.
 * 
 * <P>
 * File is assumed to be and ASCII string of digits
 * representing a value of this data type.
 */
public String importObject(FileInputStream inStream) throws IOException {
  InputStreamReader inReader = new InputStreamReader(inStream);
  int fileSize = inStream.available();
  char charBuf[] = new char[fileSize];
  int count = inReader.read(charBuf, 0, fileSize);
  if (count != fileSize)
    throw new IOException("Could read only " + count + " chars from a total file size of " + fileSize + ". Import failed.");
  // convert file text into a string
  // Special case: some systems tack a newline at the end of
  // the text read.  Assume that if last char is a newline that
  // we want everything else in the line.
  String fileText;
  if (charBuf[count - 1] == KeyEvent.VK_ENTER)
    fileText = new String(charBuf, 0, count - 1);
  else
    fileText = new String(charBuf);
  // test that the string is valid by converting it into an
  // object of this data type
  StringBuffer messageBuffer = new StringBuffer();
  validateAndConvertInPopup(fileText, null, messageBuffer);
  if (messageBuffer.length() > 0) {
    // convert number conversion issue into IO issue for consistancy
    throw new IOException("Text does not represent data of type " + getClassName() + ".  Text was:\n" + fileText);
  }
  // return the text from the file since it does
  // represent a valid data value
  return fileText;
}


Next
Previous
Clone Instance
6
Line Count
40
Source Line
518
Source File
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeDouble.java

/**
 * Read a file and construct a valid object from its contents.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported
 * data can be converted to an object, and then must return
 * a text string that can be used in the Popup window text area.
 * This object-to-text conversion is the same as is done by
 * the DataType object internally in the getJTextArea() method.
 *
 * <P>
 * File is assumed to be and ASCII string of digits
 * representing a value of this data type.
 */
public String importObject(FileInputStream inStream) throws IOException {
  InputStreamReader inReader = new InputStreamReader(inStream);
  int fileSize = inStream.available();
  char charBuf[] = new char[fileSize];
  int count = inReader.read(charBuf, 0, fileSize);
  if (count != fileSize)
    throw new IOException("Could read only " + count + " chars from a total file size of " + fileSize + ". Import failed.");
  // convert file text into a string
  // Special case: some systems tack a newline at the end of
  // the text read.  Assume that if last char is a newline that
  // we want everything else in the line.
  String fileText;
  if (charBuf[count - 1] == KeyEvent.VK_ENTER)
    fileText = new String(charBuf, 0, count - 1);
  else
    fileText = new String(charBuf);
  // test that the string is valid by converting it into an
  // object of this data type
  StringBuffer messageBuffer = new StringBuffer();
  validateAndConvertInPopup(fileText, null, messageBuffer);
  if (messageBuffer.length() > 0) {
    // convert number conversion issue into IO issue for consistancy
    throw new IOException("Text does not represent data of type " + getClassName() + ".  Text was:\n" + fileText);
  }
  // return the text from the file since it does
  // represent a valid data value
  return fileText;
}


Next
Previous
Clone Instance
7
Line Count
40
Source Line
520
Source File
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeFloat.java

/**
 * Read a file and construct a valid object from its contents.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported
 * data can be converted to an object, and then must return
 * a text string that can be used in the Popup window text area.
 * This object-to-text conversion is the same as is done by
 * the DataType object internally in the getJTextArea() method.
 *
 * <P>
 * File is assumed to be and ASCII string of digits
 * representing a value of this data type.
 */
public String importObject(FileInputStream inStream) throws IOException {
  InputStreamReader inReader = new InputStreamReader(inStream);
  int fileSize = inStream.available();
  char charBuf[] = new char[fileSize];
  int count = inReader.read(charBuf, 0, fileSize);
  if (count != fileSize)
    throw new IOException("Could read only " + count + " chars from a total file size of " + fileSize + ". Import failed.");
  // convert file text into a string
  // Special case: some systems tack a newline at the end of
  // the text read.  Assume that if last char is a newline that
  // we want everything else in the line.
  String fileText;
  if (charBuf[count - 1] == KeyEvent.VK_ENTER)
    fileText = new String(charBuf, 0, count - 1);
  else
    fileText = new String(charBuf);
  // test that the string is valid by converting it into an
  // object of this data type
  StringBuffer messageBuffer = new StringBuffer();
  validateAndConvertInPopup(fileText, null, messageBuffer);
  if (messageBuffer.length() > 0) {
    // convert number conversion issue into IO issue for consistancy
    throw new IOException("Text does not represent data of type " + getClassName() + ".  Text was:\n" + fileText);
  }
  // return the text from the file since it does
  // represent a valid data value
  return fileText;
}


Next
Previous
Clone Instance
8
Line Count
40
Source Line
502
Source File
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeInteger.java

/**
 * Read a file and construct a valid object from its contents.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported
 * data can be converted to an object, and then must return
 * a text string that can be used in the Popup window text area.
 * This object-to-text conversion is the same as is done by
 * the DataType object internally in the getJTextArea() method.
 * 
 * <P>
 * File is assumed to be and ASCII string of digits
 * representing a value of this data type.
 */
public String importObject(FileInputStream inStream) throws IOException {
  InputStreamReader inReader = new InputStreamReader(inStream);
  int fileSize = inStream.available();
  char charBuf[] = new char[fileSize];
  int count = inReader.read(charBuf, 0, fileSize);
  if (count != fileSize)
    throw new IOException("Could read only " + count + " chars from a total file size of " + fileSize + ". Import failed.");
  // convert file text into a string
  // Special case: some systems tack a newline at the end of
  // the text read.  Assume that if last char is a newline that
  // we want everything else in the line.
  String fileText;
  if (charBuf[count - 1] == KeyEvent.VK_ENTER)
    fileText = new String(charBuf, 0, count - 1);
  else
    fileText = new String(charBuf);
  // test that the string is valid by converting it into an
  // object of this data type
  StringBuffer messageBuffer = new StringBuffer();
  validateAndConvertInPopup(fileText, null, messageBuffer);
  if (messageBuffer.length() > 0) {
    // convert number conversion issue into IO issue for consistancy
    throw new IOException("Text does not represent data of type " + getClassName() + ".  Text was:\n" + fileText);
  }
  // return the text from the file since it does
  // represent a valid data value
  return fileText;
}


Next
Previous
Clone Instance
9
Line Count
40
Source Line
473
Source File
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeLong.java

/**
 * Read a file and construct a valid object from its contents.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported
 * data can be converted to an object, and then must return
 * a text string that can be used in the Popup window text area.
 * This object-to-text conversion is the same as is done by
 * the DataType object internally in the getJTextArea() method.
 * 
 * <P>
 * File is assumed to be and ASCII string of digits
 * representing a value of this data type.
 */
public String importObject(FileInputStream inStream) throws IOException {
  InputStreamReader inReader = new InputStreamReader(inStream);
  int fileSize = inStream.available();
  char charBuf[] = new char[fileSize];
  int count = inReader.read(charBuf, 0, fileSize);
  if (count != fileSize)
    throw new IOException("Could read only " + count + " chars from a total file size of " + fileSize + ". Import failed.");
  // convert file text into a string
  // Special case: some systems tack a newline at the end of
  // the text read.  Assume that if last char is a newline that
  // we want everything else in the line.
  String fileText;
  if (charBuf[count - 1] == KeyEvent.VK_ENTER)
    fileText = new String(charBuf, 0, count - 1);
  else
    fileText = new String(charBuf);
  // test that the string is valid by converting it into an
  // object of this data type
  StringBuffer messageBuffer = new StringBuffer();
  validateAndConvertInPopup(fileText, null, messageBuffer);
  if (messageBuffer.length() > 0) {
    // convert number conversion issue into IO issue for consistancy
    throw new IOException("Text does not represent data of type " + getClassName() + ".  Text was:\n" + fileText);
  }
  // return the text from the file since it does
  // represent a valid data value
  return fileText;
}


Next
Previous
Clone Instance
10
Line Count
40
Source Line
474
Source File
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeShort.java

/**
 * Read a file and construct a valid object from its contents.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported
 * data can be converted to an object, and then must return
 * a text string that can be used in the Popup window text area.
 * This object-to-text conversion is the same as is done by
 * the DataType object internally in the getJTextArea() method.
 * 
 * <P>
 * File is assumed to be and ASCII string of digits
 * representing a value of this data type.
 */
public String importObject(FileInputStream inStream) throws IOException {
  InputStreamReader inReader = new InputStreamReader(inStream);
  int fileSize = inStream.available();
  char charBuf[] = new char[fileSize];
  int count = inReader.read(charBuf, 0, fileSize);
  if (count != fileSize)
    throw new IOException("Could read only " + count + " chars from a total file size of " + fileSize + ". Import failed.");
  // convert file text into a string
  // Special case: some systems tack a newline at the end of
  // the text read.  Assume that if last char is a newline that
  // we want everything else in the line.
  String fileText;
  if (charBuf[count - 1] == KeyEvent.VK_ENTER)
    fileText = new String(charBuf, 0, count - 1);
  else
    fileText = new String(charBuf);
  // test that the string is valid by converting it into an
  // object of this data type
  StringBuffer messageBuffer = new StringBuffer();
  validateAndConvertInPopup(fileText, null, messageBuffer);
  if (messageBuffer.length() > 0) {
    // convert number conversion issue into IO issue for consistancy
    throw new IOException("Text does not represent data of type " + getClassName() + ".  Text was:\n" + fileText);
  }
  // return the text from the file since it does
  // represent a valid data value
  return fileText;
}


Next
Previous
Clone Instance
11
Line Count
40
Source Line
573
Source File
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeTime.java

/**
 * Read a file and construct a valid object from its contents.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported
 * data can be converted to an object, and then must return
 * a text string that can be used in the Popup window text area.
 * This object-to-text conversion is the same as is done by
 * the DataType object internally in the getJTextArea() method.
 *
 * <P>
 * File is assumed to be and ASCII string of digits
 * representing a value of this data type.
 */
public String importObject(FileInputStream inStream) throws IOException {
  InputStreamReader inReader = new InputStreamReader(inStream);
  int fileSize = inStream.available();
  char charBuf[] = new char[fileSize];
  int count = inReader.read(charBuf, 0, fileSize);
  if (count != fileSize)
    throw new IOException("Could read only " + count + " chars from a total file size of " + fileSize + ". Import failed.");
  // convert file text into a string
  // Special case: some systems tack a newline at the end of
  // the text read.  Assume that if last char is a newline that
  // we want everything else in the line.
  String fileText;
  if (charBuf[count - 1] == KeyEvent.VK_ENTER)
    fileText = new String(charBuf, 0, count - 1);
  else
    fileText = new String(charBuf);
  // test that the string is valid by converting it into an
  // object of this data type
  StringBuffer messageBuffer = new StringBuffer();
  validateAndConvertInPopup(fileText, null, messageBuffer);
  if (messageBuffer.length() > 0) {
    // convert number conversion issue into IO issue for consistancy
    throw new IOException("Text does not represent data of type " + getClassName() + ".  Text was:\n" + fileText);
  }
  // return the text from the file since it does
  // represent a valid data value
  return fileText;
}


Next
Previous
Clone Instance
12
Line Count
40
Source Line
595
Source File
E:/TSE/Projects-CloneDR/sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeTimestamp.java

/**
 * Read a file and construct a valid object from its contents.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported
 * data can be converted to an object, and then must return
 * a text string that can be used in the Popup window text area.
 * This object-to-text conversion is the same as is done by
 * the DataType object internally in the getJTextArea() method.
 *
 * <P>
 * File is assumed to be and ASCII string of digits
 * representing a value of this data type.
 */
public String importObject(FileInputStream inStream) throws IOException {
  InputStreamReader inReader = new InputStreamReader(inStream);
  int fileSize = inStream.available();
  char charBuf[] = new char[fileSize];
  int count = inReader.read(charBuf, 0, fileSize);
  if (count != fileSize)
    throw new IOException("Could read only " + count + " chars from a total file size of " + fileSize + ". Import failed.");
  // convert file text into a string
  // Special case: some systems tack a newline at the end of
  // the text read.  Assume that if last char is a newline that
  // we want everything else in the line.
  String fileText;
  if (charBuf[count - 1] == KeyEvent.VK_ENTER)
    fileText = new String(charBuf, 0, count - 1);
  else
    fileText = new String(charBuf);
  // test that the string is valid by converting it into an
  // object of this data type
  StringBuffer messageBuffer = new StringBuffer();
  validateAndConvertInPopup(fileText, null, messageBuffer);
  if (messageBuffer.length() > 0) {
    // convert number conversion issue into IO issue for consistancy
    throw new IOException("Text does not represent data of type " + getClassName() + ".  Text was:\n" + fileText);
  }
  // return the text from the file since it does
  // represent a valid data value
  return fileText;
}


First
Previous
Clone Instance
13
Line Count
39
Source Line
537
Source File
E:/TSE/Projects-CloneDR/sql12/plugins/derby/src/net/sourceforge/squirrel_sql/plugins/derby/types/DerbyClobDataTypeComponent.java

/**
 * Read a file and construct a valid object from its contents. Errors are
 * returned by throwing an IOException containing the cause of the problem as
 * its message.
 * <P>
 * DataType is responsible for validating that the imported data can be
 * converted to an object, and then must return a text string that can be
 * used in the Popup window text area. This object-to-text conversion is the
 * same as is done by the DataType object internally in the getJTextArea()
 * method.
 * 
 * <P>
 * File is assumed to be and ASCII string of digits representing a value of
 * this data type.
 */
@Override public String importObject(FileInputStream inStream) throws IOException {
  InputStreamReader inReader = new InputStreamReader(inStream);
  int fileSize = inStream.available();
  char charBuf[] = new char[fileSize];
  int count = inReader.read(charBuf, 0, fileSize);
  if (count != fileSize)
    throw new IOException("Could read only " + count + " chars from a total file size of " + fileSize + ". Import failed.");
  // convert file text into a string
  // Special case: some systems tack a newline at the end of
  // the text read. Assume that if last char is a newline that
  // we want everything else in the line.
  String fileText;
  if (charBuf[count - 1] == KeyEvent.VK_ENTER)
    fileText = new String(charBuf, 0, count - 1);
  else
    fileText = new String(charBuf);
  // test that the string is valid by converting it into an
  // object of this data type
  StringBuffer messageBuffer = new StringBuffer();
  validateAndConvertInPopup(fileText, null, messageBuffer);
  if (messageBuffer.length() > 0) {
    // convert number conversion issue into IO issue for consistancy
    throw new IOException("Text does not represent data of type " + getClassName() + ".  Text was:\n" + fileText);
  }
  // return the text from the file since it does
  // represent a valid data value
  return fileText;
}


Clone AbstractionParameter Count: 1Parameter Bindings

 [[#variable1cf0a2a0]]String importObject(FileInputStream inStream) throws IOException {
  InputStreamReader inReader = new InputStreamReader(inStream);
  int fileSize = inStream.available();
  char charBuf[] = new char[fileSize];
  int count = inReader.read(charBuf, 0, fileSize);
  if (count != fileSize)
    throw new IOException("Could read only " + count + " chars from a total file size of " + fileSize + ". Import failed.");
  // convert file text into a string
  // Special case: some systems tack a newline at the end of
  // the text read.  Assume that if last char is a newline that
  // the text read. Assume that if last char is a newline that
  // we want everything else in the line.
  String fileText;
  if (charBuf[count - 1] == KeyEvent.VK_ENTER)
    fileText = new String(charBuf, 0, count - 1);
  else
    fileText = new String(charBuf);
  // test that the string is valid by converting it into an
  // object of this data type
  StringBuffer messageBuffer = new StringBuffer();
  validateAndConvertInPopup(fileText, null, messageBuffer);
  if (messageBuffer.length() > 0) {
    // convert number conversion issue into IO issue for consistancy
    // there was an error in the conversion
    throw new IOException("Text does not represent data of type " + getClassName() + ".  Text was:\n" + fileText);
  }
  // return the text from the file since it does
  // represent a valid data value
  return fileText;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#1cf0a2a0]]
/**
 * Read a file and construct a valid object from its contents.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported
 * data can be converted to an object, and then must return
 * a text string that can be used in the Popup window text area.
 * This object-to-text conversion is the same as is done by
 * the DataType object internally in the getJTextArea() method.
 *
 * <P>
 * File is assumed to be and ASCII string of digits
 * representing a value of this data type.
 */
public 
12[[#1cf0a2a0]]
/**
 * Read a file and construct a valid object from its contents. Errors are returned by throwing an
 * IOException containing the cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported data can be converted to an object, and then
 * must return a text string that can be used in the Popup window text area. This object-to-text conversion
 * is the same as is done by the DataType object internally in the getJTextArea() method.
 * <P>
 * File is assumed to be and ASCII string of digits representing a boolean value.
 */
public 
13[[#1cf0a2a0]]
/**
 * Read a file and construct a valid object from its contents.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported
 * data can be converted to an object, and then must return
 * a text string that can be used in the Popup window text area.
 * This object-to-text conversion is the same as is done by
 * the DataType object internally in the getJTextArea() method.
 * 
 * <P>
 * File is assumed to be and ASCII string of digits
 * representing a value of this data type.
 */
public 
14[[#1cf0a2a0]]
/**
 * Read a file and construct a valid object from its contents.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported
 * data can be converted to an object, and then must return
 * a text string that can be used in the Popup window text area.
 * This object-to-text conversion is the same as is done by
 * the DataType object internally in the getJTextArea() method.
 *
 * <P>
 * File is assumed to be and ASCII string of digits
 * representing a value of this data type.
 */
public 
15[[#1cf0a2a0]]
/**
 * Read a file and construct a valid object from its contents.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported
 * data can be converted to an object, and then must return
 * a text string that can be used in the Popup window text area.
 * This object-to-text conversion is the same as is done by
 * the DataType object internally in the getJTextArea() method.
 * 
 * <P>
 * File is assumed to be and ASCII string of digits
 * representing a value of this data type.
 */
public 
16[[#1cf0a2a0]]
/**
 * Read a file and construct a valid object from its contents.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported
 * data can be converted to an object, and then must return
 * a text string that can be used in the Popup window text area.
 * This object-to-text conversion is the same as is done by
 * the DataType object internally in the getJTextArea() method.
 *
 * <P>
 * File is assumed to be and ASCII string of digits
 * representing a value of this data type.
 */
public 
17[[#1cf0a2a0]]
/**
 * Read a file and construct a valid object from its contents.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported
 * data can be converted to an object, and then must return
 * a text string that can be used in the Popup window text area.
 * This object-to-text conversion is the same as is done by
 * the DataType object internally in the getJTextArea() method.
 *
 * <P>
 * File is assumed to be and ASCII string of digits
 * representing a value of this data type.
 */
public 
18[[#1cf0a2a0]]
/**
 * Read a file and construct a valid object from its contents.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported
 * data can be converted to an object, and then must return
 * a text string that can be used in the Popup window text area.
 * This object-to-text conversion is the same as is done by
 * the DataType object internally in the getJTextArea() method.
 * 
 * <P>
 * File is assumed to be and ASCII string of digits
 * representing a value of this data type.
 */
public 
19[[#1cf0a2a0]]
/**
 * Read a file and construct a valid object from its contents.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported
 * data can be converted to an object, and then must return
 * a text string that can be used in the Popup window text area.
 * This object-to-text conversion is the same as is done by
 * the DataType object internally in the getJTextArea() method.
 * 
 * <P>
 * File is assumed to be and ASCII string of digits
 * representing a value of this data type.
 */
public 
110[[#1cf0a2a0]]
/**
 * Read a file and construct a valid object from its contents.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported
 * data can be converted to an object, and then must return
 * a text string that can be used in the Popup window text area.
 * This object-to-text conversion is the same as is done by
 * the DataType object internally in the getJTextArea() method.
 * 
 * <P>
 * File is assumed to be and ASCII string of digits
 * representing a value of this data type.
 */
public 
111[[#1cf0a2a0]]
/**
 * Read a file and construct a valid object from its contents.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported
 * data can be converted to an object, and then must return
 * a text string that can be used in the Popup window text area.
 * This object-to-text conversion is the same as is done by
 * the DataType object internally in the getJTextArea() method.
 *
 * <P>
 * File is assumed to be and ASCII string of digits
 * representing a value of this data type.
 */
public 
112[[#1cf0a2a0]]
/**
 * Read a file and construct a valid object from its contents.
 * Errors are returned by throwing an IOException containing the
 * cause of the problem as its message.
 * <P>
 * DataType is responsible for validating that the imported
 * data can be converted to an object, and then must return
 * a text string that can be used in the Popup window text area.
 * This object-to-text conversion is the same as is done by
 * the DataType object internally in the getJTextArea() method.
 *
 * <P>
 * File is assumed to be and ASCII string of digits
 * representing a value of this data type.
 */
public 
113[[#1cf0a2a0]]
/**
 * Read a file and construct a valid object from its contents. Errors are
 * returned by throwing an IOException containing the cause of the problem as
 * its message.
 * <P>
 * DataType is responsible for validating that the imported data can be
 * converted to an object, and then must return a text string that can be
 * used in the Popup window text area. This object-to-text conversion is the
 * same as is done by the DataType object internally in the getJTextArea()
 * method.
 * 
 * <P>
 * File is assumed to be and ASCII string of digits representing a value of
 * this data type.
 */
@Override public