LittleEndianDataOutputStream.java
2.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
package com.google.common.io;
import com.google.common.annotations.Beta;
import com.google.common.base.Preconditions;
import com.google.common.primitives.Longs;
import java.io.DataOutput;
import java.io.DataOutputStream;
import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.OutputStream;
@Beta
public class LittleEndianDataOutputStream
extends FilterOutputStream
implements DataOutput
{
public LittleEndianDataOutputStream(OutputStream paramOutputStream)
{
super(new DataOutputStream((OutputStream)Preconditions.checkNotNull(paramOutputStream)));
}
public void close()
throws IOException
{
this.out.close();
}
public void write(byte[] paramArrayOfByte, int paramInt1, int paramInt2)
throws IOException
{
this.out.write(paramArrayOfByte, paramInt1, paramInt2);
}
public void writeBoolean(boolean paramBoolean)
throws IOException
{
((DataOutputStream)this.out).writeBoolean(paramBoolean);
}
public void writeByte(int paramInt)
throws IOException
{
((DataOutputStream)this.out).writeByte(paramInt);
}
@Deprecated
public void writeBytes(String paramString)
throws IOException
{
((DataOutputStream)this.out).writeBytes(paramString);
}
public void writeChar(int paramInt)
throws IOException
{
writeShort(paramInt);
}
public void writeChars(String paramString)
throws IOException
{
int i = 0;
while (i < paramString.length())
{
writeChar(paramString.charAt(i));
i += 1;
}
}
public void writeDouble(double paramDouble)
throws IOException
{
writeLong(Double.doubleToLongBits(paramDouble));
}
public void writeFloat(float paramFloat)
throws IOException
{
writeInt(Float.floatToIntBits(paramFloat));
}
public void writeInt(int paramInt)
throws IOException
{
this.out.write(paramInt & 0xFF);
this.out.write(paramInt >> 8 & 0xFF);
this.out.write(paramInt >> 16 & 0xFF);
this.out.write(paramInt >> 24 & 0xFF);
}
public void writeLong(long paramLong)
throws IOException
{
byte[] arrayOfByte = Longs.toByteArray(Long.reverseBytes(paramLong));
write(arrayOfByte, 0, arrayOfByte.length);
}
public void writeShort(int paramInt)
throws IOException
{
this.out.write(paramInt & 0xFF);
this.out.write(paramInt >> 8 & 0xFF);
}
public void writeUTF(String paramString)
throws IOException
{
((DataOutputStream)this.out).writeUTF(paramString);
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/google/common/io/LittleEndianDataOutputStream.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/