|
|||||||||||||||||||
| 30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| BytesURLConnection.java | - | 0% | 0% | 0% |
|
||||||||||||||
| 1 |
package org.codehaus.classworlds;
|
|
| 2 |
|
|
| 3 |
import java.net.URLConnection;
|
|
| 4 |
import java.net.URL;
|
|
| 5 |
import java.io.InputStream;
|
|
| 6 |
import java.io.ByteArrayInputStream;
|
|
| 7 |
|
|
| 8 |
/**
|
|
| 9 |
* @author Hani Suleiman (hani@formicary.net)
|
|
| 10 |
* <p/>
|
|
| 11 |
* Date: Oct 20, 2003
|
|
| 12 |
* Time: 12:46:01 AM
|
|
| 13 |
*/
|
|
| 14 |
public class BytesURLConnection extends URLConnection |
|
| 15 |
{
|
|
| 16 |
protected byte[] content; |
|
| 17 |
|
|
| 18 |
protected int offset; |
|
| 19 |
|
|
| 20 |
protected int length; |
|
| 21 |
|
|
| 22 | 0 |
public BytesURLConnection( URL url, byte[] content ) |
| 23 |
{
|
|
| 24 | 0 |
super( url );
|
| 25 | 0 |
this.content = content;
|
| 26 |
} |
|
| 27 |
|
|
| 28 | 0 |
public void connect() |
| 29 |
{
|
|
| 30 |
} |
|
| 31 |
|
|
| 32 | 0 |
public InputStream getInputStream()
|
| 33 |
{
|
|
| 34 | 0 |
return new ByteArrayInputStream( content ); |
| 35 |
} |
|
| 36 |
} |
|
||||||||||