Skip to content

Commit d04c11d

Browse files
committed
fixed spelling mistakes
1 parent 1a5a91e commit d04c11d

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎src/net/tootallnate/websocket/Charsetfunctions.java‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,23 @@ public static byte[] asciiBytes( String s ) {
3333
}
3434
}
3535

36-
public static String stingAscii( byte[] bytes ) {
37-
return stingAscii( bytes, 0, bytes.length );
36+
public static String stringAscii( byte[] bytes ) {
37+
return stringAscii( bytes, 0, bytes.length );
3838
}
3939

40-
public static String stingAscii( byte[] bytes, int offset, int length ){
40+
public static String stringAscii( byte[] bytes, int offset, int length ){
4141
try {
4242
return new String( bytes, offset, length, "ASCII" );
4343
} catch ( UnsupportedEncodingException e ) {
4444
throw new RuntimeException( e );
4545
}
4646
}
4747

48-
public static String stingUtf8( byte[] bytes ) throws CharacterCodingException {
49-
return stingAscii( bytes, 0, bytes.length );
48+
public static String stringUtf8( byte[] bytes ) throws CharacterCodingException {
49+
return stringAscii( bytes, 0, bytes.length );
5050
}
5151

52-
public static String stingUtf8( byte[] bytes, int off, int length ) throws CharacterCodingException {
52+
public static String stringUtf8( byte[] bytes, int off, int length ) throws CharacterCodingException {
5353
CharsetDecoder encode = Charset.forName( "UTF8" ).newDecoder();
5454
encode.onMalformedInput( codingErrorAction );
5555
return encode.decode( ByteBuffer.wrap( bytes, off, length ) ).toString();

‎src/net/tootallnate/websocket/CloseFrameBuilder.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ public int getCloseCode() {
6666
@Override
6767
public String getMessage() throws CharacterCodingException {
6868
if( getCloseCode() == CloseFrame.NOCODE ) {
69-
return Charsetfunctions.stingUtf8( unmaskedpayload.array() );
69+
return Charsetfunctions.stringUtf8( unmaskedpayload.array() );
7070
}
7171
else{
72-
return Charsetfunctions.stingUtf8( unmaskedpayload.array(),2,unmaskedpayload.array().length-2 );
72+
return Charsetfunctions.stringUtf8( unmaskedpayload.array(),2,unmaskedpayload.array().length-2 );
7373
}
7474
}
7575

‎src/net/tootallnate/websocket/Draft.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public static ByteBuffer readLine( ByteBuffer buf ) {
5050

5151
public static String readStringLine( ByteBuffer buf ) {
5252
ByteBuffer b = readLine( buf );
53-
return b == null ? null : Charsetfunctions.stingAscii( b.array(), 0, b.limit() );
53+
return b == null ? null : Charsetfunctions.stringAscii( b.array(), 0, b.limit() );
5454
}
5555

5656
public static HandshakeBuilder translateHandshakeHttp( ByteBuffer buf ) throws InvalidHandshakeException {

‎src/net/tootallnate/websocket/WebSocket.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ else if( curop == Opcode.CLOSING ) {
266266
if( currentframe == null ) {
267267
if( f.isFin() ) {
268268
if( f.getOpcode() == Opcode.TEXT ) {
269-
wsl.onMessage( this, Charsetfunctions.stingUtf8( f.getPayloadData() ) );
269+
wsl.onMessage( this, Charsetfunctions.stringUtf8( f.getPayloadData() ) );
270270
} else if( f.getOpcode() == Opcode.BINARY ) {
271271
wsl.onMessage( this, f.getPayloadData() );
272272
} else {
@@ -284,7 +284,7 @@ else if( curop == Opcode.CLOSING ) {
284284
close( e );
285285
}
286286
if( f.isFin() ) {
287-
wsl.onMessage( this, Charsetfunctions.stingUtf8( currentframe.getPayloadData() ) );
287+
wsl.onMessage( this, Charsetfunctions.stringUtf8( currentframe.getPayloadData() ) );
288288
currentframe = null;
289289
}
290290
}

0 commit comments

Comments
 (0)