it.ssc.io.DataInputStreamFormat Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jsr331-ssc Show documentation
Show all versions of jsr331-ssc Show documentation
This is a JSR331 interface for SSC (Software for the Calculation of the Simplex) is a java library for solving linear programming problems v. 3.0.1.
SSC was designed and developed by Stefano Scarioli.
The newest version!
package it.ssc.io;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
public class DataInputStreamFormat extends DataInputStream {
private StringBuffer sbuffer;
private int char_letti;
private char char_letto;
public DataInputStreamFormat(InputStream arg0) throws IOException {
super(arg0);
// TODO Auto-generated constructor stub
}
public String readChars(int size) throws IOException {
sbuffer=new StringBuffer(size);
char_letti=0;
while(char_letti < size) {
char_letto=readChar();
char_letti++;
if(char_letto!='\u0000') sbuffer.append(char_letto);
}
return sbuffer.toString();
}
}