Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
255e3002
Kaydet (Commit)
255e3002
authored
Eyl 29, 2014
tarafından
Noel Grandin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fix more Java1.5 incompatibility
Change-Id: I9c4d62e4d3703e4e1015efe2b2917d54f82bc83f
üst
3e5371ab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
31 deletions
+53
-31
XInputStreamToInputStreamAdapter.java
...tar/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
+37
-25
XOutputStreamToOutputStreamAdapter.java
...r/lib/uno/adapter/XOutputStreamToOutputStreamAdapter.java
+16
-6
No files found.
javaunohelper/com/sun/star/lib/uno/adapter/XInputStreamToInputStreamAdapter.java
Dosyayı görüntüle @
255e3002
...
...
@@ -55,7 +55,9 @@ public final class XInputStreamToInputStreamAdapter extends InputStream {
try
{
bytesAvail
=
xin
.
available
();
}
catch
(
Exception
e
)
{
throw
new
IOException
(
e
);
IOException
newEx
=
new
IOException
(
e
.
getMessage
());
newEx
.
initCause
(
e
);
throw
newEx
;
}
return
(
bytesAvail
);
...
...
@@ -66,7 +68,9 @@ public final class XInputStreamToInputStreamAdapter extends InputStream {
try
{
xin
.
closeInput
();
}
catch
(
Exception
e
)
{
throw
new
IOException
(
e
);
IOException
newEx
=
new
IOException
(
e
.
getMessage
());
newEx
.
initCause
(
e
);
throw
newEx
;
}
}
...
...
@@ -79,15 +83,17 @@ public final class XInputStreamToInputStreamAdapter extends InputStream {
if
(
bytesRead
<=
0
)
{
return
(-
1
);
}
else
{
int
tmpInt
=
tmp
[
0
][
0
];
if
(
tmpInt
<
0
){
tmpInt
=
256
+
tmpInt
;
}
int
tmpInt
=
tmp
[
0
][
0
];
if
(
tmpInt
<
0
){
tmpInt
=
256
+
tmpInt
;
}
return
(
tmpInt
);
}
}
catch
(
Exception
e
)
{
throw
new
IOException
(
e
);
IOException
newEx
=
new
IOException
(
e
.
getMessage
());
newEx
.
initCause
(
e
);
throw
newEx
;
}
}
...
...
@@ -107,7 +113,9 @@ public final class XInputStreamToInputStreamAdapter extends InputStream {
System
.
arraycopy
(
tmp
[
0
],
0
,
b
,
0
,
b
.
length
);
}
}
catch
(
Exception
e
)
{
throw
new
IOException
(
e
);
IOException
newEx
=
new
IOException
(
e
.
getMessage
());
newEx
.
initCause
(
e
);
throw
newEx
;
}
return
(
bytesRead
);
...
...
@@ -117,31 +125,31 @@ public final class XInputStreamToInputStreamAdapter extends InputStream {
public
int
read
(
byte
[]
b
,
int
off
,
int
len
)
throws
IOException
{
byte
[][]
tmp
=
new
byte
[
1
][
b
.
length
];
try
{
long
bytesRead
;
long
bytesRead
;
int
av
=
xin
.
available
();
if
(
av
!=
0
&&
len
>
av
)
{
bytesRead
=
xin
.
readBytes
(
tmp
,
av
);
}
else
{
bytesRead
=
xin
.
readBytes
(
tmp
,
len
);
}
if
(
av
!=
0
&&
len
>
av
)
{
bytesRead
=
xin
.
readBytes
(
tmp
,
av
);
}
else
{
bytesRead
=
xin
.
readBytes
(
tmp
,
len
);
}
// Casting bytesRead to an int is okay, since the user can
// only pass in an integer length to read, so the bytesRead
// must <= len.
if
(
bytesRead
<=
0
)
{
return
(-
1
);
}
else
if
(
bytesRead
<
len
)
{
System
.
arraycopy
(
tmp
[
0
],
0
,
b
,
off
,
(
int
)
bytesRead
);
}
else
{
}
else
if
(
bytesRead
<
len
)
{
System
.
arraycopy
(
tmp
[
0
],
0
,
b
,
off
,
(
int
)
bytesRead
);
}
else
{
System
.
arraycopy
(
tmp
[
0
],
0
,
b
,
off
,
len
);
}
return
((
int
)
bytesRead
);
}
return
((
int
)
bytesRead
);
}
catch
(
Exception
e
)
{
throw
new
IOException
(
e
);
IOException
newEx
=
new
IOException
(
e
.
getMessage
());
newEx
.
initCause
(
e
);
throw
newEx
;
}
}
...
...
@@ -155,7 +163,9 @@ public final class XInputStreamToInputStreamAdapter extends InputStream {
try
{
avail
=
xin
.
available
();
}
catch
(
Exception
e
)
{
throw
new
IOException
(
e
);
IOException
newEx
=
new
IOException
(
e
.
getMessage
());
newEx
.
initCause
(
e
);
throw
newEx
;
}
do
{
...
...
@@ -170,7 +180,9 @@ public final class XInputStreamToInputStreamAdapter extends InputStream {
try
{
xin
.
skipBytes
(
tmpIntVal
);
}
catch
(
Exception
e
)
{
throw
new
IOException
(
e
);
IOException
newEx
=
new
IOException
(
e
.
getMessage
());
newEx
.
initCause
(
e
);
throw
newEx
;
}
}
while
(
tmpLongVal
>
0
);
...
...
javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToOutputStreamAdapter.java
Dosyayı görüntüle @
255e3002
...
...
@@ -53,7 +53,9 @@ public final class XOutputStreamToOutputStreamAdapter extends OutputStream {
try
{
xout
.
closeOutput
();
}
catch
(
Exception
e
)
{
throw
new
IOException
(
e
);
IOException
newEx
=
new
IOException
(
e
.
getMessage
());
newEx
.
initCause
(
e
);
throw
newEx
;
}
}
...
...
@@ -62,17 +64,21 @@ public final class XOutputStreamToOutputStreamAdapter extends OutputStream {
try
{
xout
.
flush
();
}
catch
(
Exception
e
)
{
throw
new
IOException
(
e
);
IOException
newEx
=
new
IOException
(
e
.
getMessage
());
newEx
.
initCause
(
e
);
throw
newEx
;
}
}
@Override
public
void
write
(
byte
[]
b
)
throws
IOException
{
try
{
try
{
xout
.
writeBytes
(
b
);
}
catch
(
Exception
e
)
{
throw
new
IOException
(
e
);
IOException
newEx
=
new
IOException
(
e
.
getMessage
());
newEx
.
initCause
(
e
);
throw
newEx
;
}
}
...
...
@@ -88,7 +94,9 @@ public final class XOutputStreamToOutputStreamAdapter extends OutputStream {
try
{
xout
.
writeBytes
(
tmp
);
}
catch
(
Exception
e
)
{
throw
new
IOException
(
e
);
IOException
newEx
=
new
IOException
(
e
.
getMessage
());
newEx
.
initCause
(
e
);
throw
newEx
;
}
}
...
...
@@ -101,7 +109,9 @@ public final class XOutputStreamToOutputStreamAdapter extends OutputStream {
try
{
xout
.
writeBytes
(
oneByte
);
}
catch
(
Exception
e
)
{
throw
new
IOException
(
e
);
IOException
newEx
=
new
IOException
(
e
.
getMessage
());
newEx
.
initCause
(
e
);
throw
newEx
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment