1 // Copyright 2012 Google Inc. All Rights Reserved.
3 package com
.google
.appengine
.api
.socket
;
5 import java
.io
.IOException
;
6 import java
.io
.OutputStream
;
9 * A socket output stream.
12 class AppEngineSocketOutputStream
extends OutputStream
{
13 final AppEngineSocketImpl socketImpl
;
15 AppEngineSocketOutputStream(AppEngineSocketImpl socket
) {
16 this.socketImpl
= socket
;
20 * @see java.io.OutputStream#write(int)
23 public void write(int b
) throws IOException
{
24 byte[] buf
= { (byte) b
};
29 * @see java.io.OutputStream#write(byte[], int, int)
32 public void write(byte[] buf
, int off
, int len
) throws IOException
{
33 socketImpl
.send(buf
, off
, len
);
40 public void close() throws IOException
{