public synchronized byte[] lookupAudio(String inputtype,String locale,String voice,String outputparams,String style,String effects,String inputtext) throws SQLException {
  if (inputtype == null || locale == null || voice == null || inputtext == null) {
    throw new NullPointerException("Null argument");
  }
  byte[] audio=null;
  String query="Select outputaudio FROM marycache WHERE inputtype = '" + inputtype + "' AND outputtype = 'AUDIO' AND locale = '"+ locale+ "' AND voice = '"+ voice+ "' AND outputparams = '"+ outputparams+ "' AND style = '"+ style+ "' AND effects = '"+ effects+ "' AND inputtext = ?";
  PreparedStatement st=connection.prepareStatement(query);
  st.setString(1,inputtext);
  ResultSet results=st.executeQuery();
  if (results.next()) {
    audio=results.getBytes(1);
  }
  return audio;
}

public synchronized byte [ ] lookupAudio ( String inputtype , String locale , String voice , String outputparams , String style , String effects , String inputtext ) throws SQLException { if ( inputtype == null || locale == null || voice == null || inputtext == null ) { throw new NullPointerException ( "Null argument" ) ; } byte [ ] audio = null ; String query = "Select outputaudio FROM marycache WHERE inputtype = '" + inputtype + "' AND outputtype = 'AUDIO' AND locale = '" + locale + "' AND voice = '" + voice + "' AND outputparams = '" + outputparams + "' AND style = '" + style + "' AND effects = '" + effects + "' AND inputtext = ?" ; PreparedStatement st = connection . prepareStatement ( query ) ; st . setString ( 1 , inputtext ) ; ResultSet results = st . executeQuery ( ) ; if ( results . next ( ) ) { audio = results . getBytes ( 1 ) ; } return audio ; }
carry out a lookup in the cache with the given parameters , for a request with output type audio .
