/** * Sets the inputStream attribute of the CommonDS object * * @param is The new inputStream value */ public void setInputStream(InputStream is) { connected = true; try { super.setLocator(null); } catch (MediaException e) { } inputStream = is; // Enable to call to is.reset() // This is not right. The implementation actually allocates // this amount of memory. MAX_VALUE is more than the java // heap! // is.mark(Integer.MAX_VALUE); // try { // //enable to call to is.reset() // is.mark(is.available()); // } catch (IOException ioe) { // //ignore // } contentLength = -1; // try { // contentLength = is.available(); // } catch(IOException e) { // contentLength = -1; // } }
public void setLocator(String ml) throws MediaException { super.setLocator(urlCvrt(ml)); }