Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Yuta HIGUCHI
2014-10-15 23:13:42 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b0995dfa8d5bbba545dc177f119e088688fbc794
b0995dfa
1 parent
2fe46a26
suppress warning
Change-Id: Ic1fbe907c9e533eb4ed320efc13a313042edd132
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
core/store/serializers/src/main/java/org/onlab/onos/store/serializers/IpAddressSerializer.java
core/store/serializers/src/main/java/org/onlab/onos/store/serializers/IpPrefixSerializer.java
core/store/serializers/src/main/java/org/onlab/onos/store/serializers/IpAddressSerializer.java
View file @
b0995df
...
...
@@ -20,8 +20,7 @@ public class IpAddressSerializer extends Serializer<IpAddress> {
}
@Override
public
void
write
(
Kryo
kryo
,
Output
output
,
IpAddress
object
)
{
public
void
write
(
Kryo
kryo
,
Output
output
,
IpAddress
object
)
{
byte
[]
octs
=
object
.
toOctets
();
output
.
writeInt
(
octs
.
length
);
output
.
writeBytes
(
octs
);
...
...
@@ -29,11 +28,10 @@ public class IpAddressSerializer extends Serializer<IpAddress> {
}
@Override
public
IpAddress
read
(
Kryo
kryo
,
Input
input
,
Class
<
IpAddress
>
type
)
{
int
octLen
=
input
.
readInt
();
public
IpAddress
read
(
Kryo
kryo
,
Input
input
,
Class
<
IpAddress
>
type
)
{
final
int
octLen
=
input
.
readInt
();
byte
[]
octs
=
new
byte
[
octLen
];
input
.
read
(
octs
);
input
.
read
Bytes
(
octs
);
int
prefLen
=
input
.
readInt
();
return
IpAddress
.
valueOf
(
octs
,
prefLen
);
}
...
...
core/store/serializers/src/main/java/org/onlab/onos/store/serializers/IpPrefixSerializer.java
View file @
b0995df
...
...
@@ -34,7 +34,7 @@ public final class IpPrefixSerializer extends Serializer<IpPrefix> {
Class
<
IpPrefix
>
type
)
{
int
octLen
=
input
.
readInt
();
byte
[]
octs
=
new
byte
[
octLen
];
input
.
read
(
octs
);
input
.
read
Bytes
(
octs
);
int
prefLen
=
input
.
readInt
();
return
IpPrefix
.
valueOf
(
octs
,
prefLen
);
}
...
...
Please
register
or
login
to post a comment