Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for writeUtf8 (0.29 sec)

  1. android/guava-tests/test/com/google/common/io/ByteStreamsTest.java

        assertThat(computedExpected).isEqualTo(hardcodedExpected);
      }
    
      public void testNewDataOutput_writeUTF() {
        ByteArrayDataOutput out = ByteStreams.newDataOutput();
        out.writeUTF("r\u00C9sum\u00C9");
        byte[] expected = "r\u00C9sum\u00C9".getBytes(Charsets.UTF_8);
        byte[] actual = out.toByteArray();
        // writeUTF writes the length of the string in 2 bytes
        assertEquals(0, actual[0]);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/io/ByteStreams.java

          try {
            output.writeShort(v);
          } catch (IOException impossible) {
            throw new AssertionError(impossible);
          }
        }
    
        @Override
        public void writeUTF(String s) {
          try {
            output.writeUTF(s);
          } catch (IOException impossible) {
            throw new AssertionError(impossible);
          }
        }
    
        @Override
        public byte[] toByteArray() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jan 17 18:59:58 GMT 2024
    - 29.7K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/io/ByteStreamsTest.java

        assertThat(computedExpected).isEqualTo(hardcodedExpected);
      }
    
      public void testNewDataOutput_writeUTF() {
        ByteArrayDataOutput out = ByteStreams.newDataOutput();
        out.writeUTF("r\u00C9sum\u00C9");
        byte[] expected = "r\u00C9sum\u00C9".getBytes(Charsets.UTF_8);
        byte[] actual = out.toByteArray();
        // writeUTF writes the length of the string in 2 bytes
        assertEquals(0, actual[0]);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (1)
  4. src/main/java/jcifs/smb1/smb1/SmbRandomAccessFile.java

            for( int i = 0, j = 0; i < clen; i++ ) {
                b[j++] = (byte)(c[i] >>> 8);
                b[j++] = (byte)(c[i] >>> 0);
            }
            write( b, 0, blen );
        }
        public final void writeUTF( String str ) throws SmbException {
            int len = str.length();
            int ch, size = 0;
            byte[] dst;
    
            for( int i = 0; i < len; i++ ) {
                ch = str.charAt( i );
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Fri Mar 22 21:10:40 GMT 2019
    - 10.9K bytes
    - Viewed (0)
  5. src/main/java/jcifs/smb/SmbRandomAccessFile.java

                b[ j++ ] = (byte) ( c[ i ] >>> 8 );
                b[ j++ ] = (byte) ( c[ i ] >>> 0 );
            }
            write(b, 0, blen);
        }
    
    
        @Override
        public final void writeUTF ( String str ) throws SmbException {
            int len = str.length();
            int ch, size = 0;
            byte[] dst;
    
            for ( int i = 0; i < len; i++ ) {
                ch = str.charAt(i);
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Wed Jan 08 12:01:33 GMT 2020
    - 18.5K bytes
    - Viewed (0)
Back to top