Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
partial fix (images,audio,video) for proxy and content-type problem h…
…ttp://forum.yacy-websuche.de/viewtopic.php?f=5&t=1374 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5084 6c8d7289-2bf4-0310-a012-ef5d649a1542
- Loading branch information
danielr
committed
Aug 26, 2008
1 parent
0df2e47
commit 9ff4fc1
Showing
6 changed files
with
186 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* MultiOutputStream.java | ||
* @since 26.08.2008 | ||
*/ | ||
package de.anomic.http; | ||
|
||
import java.io.IOException; | ||
import java.io.OutputStream; | ||
|
||
/** | ||
* writes to multiple {link OutputStream}s (parallel) | ||
* | ||
* @author daniel | ||
* | ||
*/ | ||
class MultiOutputStream extends OutputStream { | ||
|
||
private final OutputStream[] streams; | ||
|
||
/** | ||
* creates a new MultiOutputStream | ||
* | ||
* @param streams | ||
*/ | ||
public MultiOutputStream(final OutputStream[] streams) { | ||
super(); | ||
// make a copy to avoid external modifications | ||
this.streams = new OutputStream[streams.length]; | ||
System.arraycopy(streams, 0, this.streams, 0, streams.length); | ||
} | ||
|
||
/** | ||
* writes the byte to each of the streams | ||
* | ||
* @see java.io.OutputStream#write(int) | ||
*/ | ||
@Override | ||
public void write(int b) throws IOException { | ||
for(OutputStream stream: streams) { | ||
stream.write(b); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters