Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for writeUTF (0.18 sec)

  1. android/guava/src/com/google/common/io/LittleEndianDataOutputStream.java

       */
      @Override
      public void writeShort(int v) throws IOException {
        out.write(0xFF & v);
        out.write(0xFF & (v >> 8));
      }
    
      @Override
      public void writeUTF(String str) throws IOException {
        ((DataOutputStream) out).writeUTF(str);
      }
    
      // Overriding close() because FilterOutputStream's close() method pre-JDK8 has bad behavior:
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 5.2K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/io/ByteArrayDataOutput.java

      @Override
      void writeLong(long v);
    
      @Override
      void writeFloat(float v);
    
      @Override
      void writeDouble(double v);
    
      @Override
      void writeChars(String s);
    
      @Override
      void writeUTF(String s);
    
      /**
       * @deprecated This method is dangerous as it discards the high byte of every character. For
       *     UTF-8, use {@code write(s.getBytes(StandardCharsets.UTF_8))}.
       */
      @Deprecated
      @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 2K 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 (0)
  4. 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 21.9K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/io/LittleEndianDataInputStreamTest.java

        out.writeByte((byte) 200);
        out.writeChar('a');
        out.writeShort((short) -30000);
        out.writeShort((short) 50000);
        out.writeInt(0xCAFEBABE);
        out.writeLong(0xDEADBEEFCAFEBABEL);
        out.writeUTF("Herby Derby");
        out.writeFloat(Float.intBitsToFloat(0xCAFEBABE));
        out.writeDouble(Double.longBitsToDouble(0xDEADBEEFCAFEBABEL));
      }
    
      public void testReadFully() throws IOException {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/io/LittleEndianDataInputStreamTest.java

        out.writeByte((byte) 200);
        out.writeChar('a');
        out.writeShort((short) -30000);
        out.writeShort((short) 50000);
        out.writeInt(0xCAFEBABE);
        out.writeLong(0xDEADBEEFCAFEBABEL);
        out.writeUTF("Herby Derby");
        out.writeFloat(Float.intBitsToFloat(0xCAFEBABE));
        out.writeDouble(Double.longBitsToDouble(0xDEADBEEFCAFEBABEL));
      }
    
      public void testReadFully() throws IOException {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.8K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/io/LittleEndianDataOutputStreamTest.java

        out.writeByte((byte) 200);
        out.writeChar('a');
        out.writeShort((short) -30000);
        out.writeShort((short) 50000);
        out.writeInt(0xCAFEBABE);
        out.writeLong(0xDEADBEEFCAFEBABEL);
        out.writeUTF("Herby Derby");
        out.writeFloat(Float.intBitsToFloat(0xCAFEBABE));
        out.writeDouble(Double.longBitsToDouble(0xDEADBEEFCAFEBABEL));
    
        byte[] data = baos.toByteArray();
    
        /* Setup input streams */
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.7K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/io/LittleEndianDataOutputStreamTest.java

        out.writeByte((byte) 200);
        out.writeChar('a');
        out.writeShort((short) -30000);
        out.writeShort((short) 50000);
        out.writeInt(0xCAFEBABE);
        out.writeLong(0xDEADBEEFCAFEBABEL);
        out.writeUTF("Herby Derby");
        out.writeFloat(Float.intBitsToFloat(0xCAFEBABE));
        out.writeDouble(Double.longBitsToDouble(0xDEADBEEFCAFEBABEL));
    
        byte[] data = baos.toByteArray();
    
        /* Setup input streams */
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.7K bytes
    - Viewed (0)
  9. 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 Apr 28 00:10:09 GMT 2024
    - Last Modified: Fri Mar 22 21:10:40 GMT 2019
    - 10.9K bytes
    - Viewed (0)
  10. 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)
Back to top