@Test public void testParseInt() throws Exception { String[] str = new String[] {"101.483", "-100", " -1", " 1 ", "999", "-4.342 ", "- 80"}; int[] itg = new int[] {101, -100, -1, 1, 999, -4, -80}; for(int i = 0; i < str.length; i++) { assertEquals(itg[i], RTMedibus.parseInt(str[i].getBytes("ASCII"))); } assertEquals(-80, RTMedibus.parseInt(new byte[] {'1','0','-',' ',' ','-',' ',' ','8','0','.','5'}, 3, 9)); }
protected static final int parseInt(final byte[] buf) { return parseInt(buf, 0, buf.length); }
RTMedibus extends Medibus { protected static final int parseInt(final byte[] buf) { return parseInt(buf, 0, buf.length); } }
RTMedibus extends Medibus { protected static final int parseInt(final byte[] buf) { return parseInt(buf, 0, buf.length); } RTMedibus(InputStream in, OutputStream out); }
RTMedibus extends Medibus { protected static final int parseInt(final byte[] buf) { return parseInt(buf, 0, buf.length); } RTMedibus(InputStream in, OutputStream out); void sendEnableRealtime(int[] traces); void receiveSyncByte(int syncByte); void receiveSyncCommand(int command, int argument); void startInspiratoryCycle(); void startExpiratoryCycle(); RTTransmit[] getLastTransmitted(); void receiveData(int first, int second); void receiveDataValue(RTDataConfig config, int multiplier, int streamIndex, Object realtimeData, double data); synchronized void sendRTTransmissionCommand(RTTransmit[] transmits); }
RTMedibus extends Medibus { protected static final int parseInt(final byte[] buf) { return parseInt(buf, 0, buf.length); } RTMedibus(InputStream in, OutputStream out); void sendEnableRealtime(int[] traces); void receiveSyncByte(int syncByte); void receiveSyncCommand(int command, int argument); void startInspiratoryCycle(); void startExpiratoryCycle(); RTTransmit[] getLastTransmitted(); void receiveData(int first, int second); void receiveDataValue(RTDataConfig config, int multiplier, int streamIndex, Object realtimeData, double data); synchronized void sendRTTransmissionCommand(RTTransmit[] transmits);  }